Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #71 from chalmers-revere/pre-release
Browse files Browse the repository at this point in the history
Pre release
  • Loading branch information
chrberger authored Dec 7, 2016
2 parents db85f0c + 0459393 commit ad1cc61
Show file tree
Hide file tree
Showing 42 changed files with 212 additions and 367 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.7.1 - Updates to proxy-velodyne16 to handle SPC and CPC; new release 0.7.1
0.7.0 - Changing CompactPointCloud from half_float to uint16_t
0.6.0 - Improved CompactPointCloud handling in Velodyne 16, upgraded use-cases to docker-compose 1.9.0
0.5.0 - CompactPointCloud in Velodyne
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.0
0.7.1
2 changes: 1 addition & 1 deletion code/core/system/health/man/opendlv-core-system-health.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-system-health
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-system-health 1 "02 December 2016" "0.7.0" "opendlv-core-system-health man page"
.TH opendlv-core-system-health 1 "07 December 2016" "0.7.1" "opendlv-core-system-health man page"

.SH NAME
opendlv-core-system-health \- This component checks the health of the runtime environment.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-applanix
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-applanix 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-applanix man page"
.TH opendlv-core-proxy-applanix 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-applanix man page"

.SH NAME
opendlv-core-proxy-applanix \- This tool interfaces to GPS/IMU unit Applanix.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-camera-axis
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-camera-axis 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-camera-axis man page"
.TH opendlv-core-proxy-camera-axis 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-camera-axis man page"

.SH NAME
opendlv-core-proxy-camera-axis \- This tool interfaces with Axis cameras.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-camera
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-camera 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-camera man page"
.TH opendlv-core-proxy-camera 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-camera man page"

.SH NAME
opendlv-core-proxy-camera \- This tool interfaces with the FH16 truck.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-fh16truck
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-fh16truck 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-fh16truck man page"
.TH opendlv-core-proxy-fh16truck 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-fh16truck man page"

.SH NAME
opendlv-core-proxy-fh16truck \- This tool interfaces with the FH16 truck.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-imu
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-imu 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-imu man page"
.TH opendlv-core-proxy-imu 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-imu man page"

.SH NAME
opendlv-core-proxy-imu \- This tool interfaces with a imu.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-ledstrip
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-ledstrip 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-ledstrip man page"
.TH opendlv-core-proxy-ledstrip 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-ledstrip man page"

.SH NAME
opendlv-core-proxy-ledstrip \- This tool interfaces with an LED strip.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-sick
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-sick 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-sick man page"
.TH opendlv-core-proxy-sick 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-sick man page"

.SH NAME
opendlv-core-proxy-sick \- This tool interfaces with the Sick lidar device.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-trimble
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-trimble 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-trimble man page"
.TH opendlv-core-proxy-trimble 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-trimble man page"

.SH NAME
opendlv-core-proxy-trimble \- This tool interfaces to GPS/IMU unit Trimble.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-v2v
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-v2v 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-v2v man page"
.TH opendlv-core-proxy-v2v 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-v2v man page"

.SH NAME
opendlv-core-proxy-v2v \- This tool interfaces with a V2V unit.
Expand Down
4 changes: 1 addition & 3 deletions code/core/system/proxy-velodyne16/include/ProxyVelodyne16.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <opendavinci/odcore/io/udp/UDPFactory.h>
#include <opendavinci/odcore/io/udp/UDPReceiver.h>
#include "velodyne16Decoder.h"
#include "velodyne16DecoderCPC.h"

namespace opendlv {
namespace core {
Expand Down Expand Up @@ -77,7 +76,7 @@ class ProxyVelodyne16 : public odcore::base::module::DataTriggeredConferenceClie
virtual void tearDown();

private:
bool m_CompactPointCloud;
uint32_t m_pointCloudOption; //0: shared point cloud (SPC) only; 1: compact point cloud (CPC) only; 2: both SPC and CPC
string m_memoryName; //Name of the shared memory
uint32_t m_memorySize; //The total size of the shared memory: MAX_POINT_SIZE * NUMBER_OF_COMPONENTS_PER_POINT * sizeof(float), where MAX_POINT_SIZE is the maximum number of points per frame (This upper bound should be set as low as possible, as it affects the shared memory size and thus the frame updating speed), NUMBER_OF_COMPONENTS_PER_POIN=4 (x, y, z, intensity) Recommended values: MAX_POINT_SIZE=30000

Expand All @@ -87,7 +86,6 @@ class ProxyVelodyne16 : public odcore::base::module::DataTriggeredConferenceClie
std::shared_ptr< SharedMemory > m_velodyneSharedMemory;
std::shared_ptr< odcore::io::udp::UDPReceiver > m_udpreceiver;
std::shared_ptr< opendlv::core::system::proxy::Velodyne16Decoder > m_velodyne16decoder;
std::shared_ptr< opendlv::core::system::proxy::Velodyne16DecoderCPC > m_velodyne16decoderCPC;
};
}
}
Expand Down
27 changes: 22 additions & 5 deletions code/core/system/proxy-velodyne16/include/velodyne16Decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <memory>

#include "opendavinci/generated/odcore/data/SharedPointCloud.h"
#include "opendavinci/generated/odcore/data/CompactPointCloud.h"
#include "opendavinci/odcore/data/Container.h"
#include "opendavinci/odcore/wrapper/SharedMemory.h"
#include <opendavinci/odcore/io/StringListener.h>
Expand Down Expand Up @@ -56,21 +57,27 @@ class Velodyne16Decoder : public odcore::io::StringListener {
/**
* Constructor.
*/
Velodyne16Decoder(const std::shared_ptr< SharedMemory >, odcore::io::conference::ContainerConference &, const string &);
//Use this constructor if the VLP-16 live feed is decoded and sent out as shared point cloud. The last boolean parameter tells if compact point cloud is sent out as well
Velodyne16Decoder(const std::shared_ptr< SharedMemory >, odcore::io::conference::ContainerConference &, const string &, const bool &);

//Use this constructor if the VLP-16 live feed is decoded and sent out as compact point cloud only.
Velodyne16Decoder(odcore::io::conference::ContainerConference &);

virtual ~Velodyne16Decoder();

virtual void nextString(const std::string &s);

private:
void sendSharedPointCloud();
void initializeArraysCPC();
void sendPointCloud();
private:
const uint32_t m_MAX_POINT_SIZE = 30000; //the maximum number of points per frame. This upper bound should be set as low as possible, as it affects the shared memory size and thus the frame updating speed.
const uint32_t m_SIZE_PER_COMPONENT = sizeof(float);
const uint8_t m_NUMBER_OF_COMPONENTS_PER_POINT = 4; // How many components do we have per vector?
const uint32_t m_SIZE = m_MAX_POINT_SIZE * m_NUMBER_OF_COMPONENTS_PER_POINT * m_SIZE_PER_COMPONENT; // What is the total size of the shared memory?

uint32_t m_pointIndex;
uint32_t m_pointIndexSPC; //current number of points of the current frame for shared point cloud
uint32_t m_pointIndexCPC; //current number of points of the current frame for compact point cloud
uint32_t m_startID;
float m_previousAzimuth;
float m_currentAzimuth;
Expand All @@ -82,8 +89,18 @@ class Velodyne16Decoder : public odcore::io::StringListener {
odcore::io::conference::ContainerConference &m_velodyneContainer;
odcore::data::SharedPointCloud m_spc; //shared point cloud
float m_vertCorrection[16]; //Vertal angle of each sensor beam
string m_calibration;
const float toRadian = static_cast<float>(M_PI) / 180.0f;
string m_calibration; //name of the calibration file for VLP-16
const float toRadian = static_cast<float>(M_PI) / 180.0f; //degree to radian
bool m_withSPC; //if SPC is expected
bool m_withCPC; //if CPC is expected

//For compact point cloud:
float m_startAzimuth;
const uint8_t m_ENTRIES_PER_AZIMUTH = 16;//For VLP-16, there are 16 points per azimuth
std::stringstream m_distanceStringStream; //The string stream with distance values for all points of one frame
bool m_isStartAzimuth; //Indicate if an azimuth is the starting azimuth of a new frame
uint8_t m_sensorOrderIndex[16];//Specify the order for each 16 points in the string with distance values
uint16_t m_16Sensors[16];//Store the distance values (in cm) of the current 16 sensors
};
}
}
Expand Down
85 changes: 0 additions & 85 deletions code/core/system/proxy-velodyne16/include/velodyne16DecoderCPC.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" Manpage for opendlv-core-proxy-velodyne16
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-velodyne16 1 "02 December 2016" "0.7.0" "opendlv-core-proxy-velodyne man page"
.TH opendlv-core-proxy-velodyne16 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-velodyne man page"

.SH NAME
opendlv-core-proxy-velodyne16 \- This tool interfaces with the FH16 truck.
Expand Down
37 changes: 21 additions & 16 deletions code/core/system/proxy-velodyne16/src/ProxyVelodyne16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <fstream>
#include <iostream>
#include <memory>
#include <stdexcept>

#include "ProxyVelodyne16.h"
#include "opendavinci/odcore/base/KeyValueConfiguration.h"
Expand All @@ -38,15 +39,14 @@ using namespace odcore::io::udp;

ProxyVelodyne16::ProxyVelodyne16(const int32_t &argc, char **argv)
: DataTriggeredConferenceClientModule(argc, argv, "proxy-velodyne16")
, m_CompactPointCloud(false)
, m_pointCloudOption(0)
, m_memoryName()
, m_memorySize(0)
, m_udpReceiverIP()
, m_udpPort(0)
, m_velodyneSharedMemory(NULL)
, m_udpreceiver(NULL)
, m_velodyne16decoder(NULL)
, m_velodyne16decoderCPC(NULL) {}
, m_velodyne16decoder(NULL) {}

ProxyVelodyne16::~ProxyVelodyne16() {}

Expand All @@ -55,25 +55,30 @@ void ProxyVelodyne16::setUp() {
m_udpPort = getKeyValueConfiguration().getValue< uint32_t >("proxy-velodyne16.udpPort");
m_udpreceiver = UDPFactory::createUDPReceiver(m_udpReceiverIP, m_udpPort);

m_CompactPointCloud = getKeyValueConfiguration().getValue< bool >("proxy-velodyne16.CompactPointCloud") == 1;
m_pointCloudOption = getKeyValueConfiguration().getValue< uint32_t >("proxy-velodyne16.pointCloudOption");
std::cout<<"Point cloud option:"<<m_pointCloudOption<<std::endl;

if(!m_CompactPointCloud) {
if(m_pointCloudOption==0 || m_pointCloudOption==2){
m_memoryName = getKeyValueConfiguration().getValue< string >("proxy-velodyne16.sharedMemory.name");
m_memorySize = getKeyValueConfiguration().getValue< uint32_t >("proxy-velodyne16.sharedMemory.size");
m_velodyneSharedMemory = SharedMemoryFactory::createSharedMemory(m_memoryName, m_memorySize);

m_velodyne16decoder = shared_ptr< Velodyne16Decoder >(new Velodyne16Decoder(m_velodyneSharedMemory, getConference(), getKeyValueConfiguration().getValue< string >("proxy-velodyne16.calibration")));

m_udpreceiver->setStringListener(m_velodyne16decoder.get());
// Start receiving bytes.
m_udpreceiver->start();
if(m_pointCloudOption==0){
m_velodyne16decoder = shared_ptr< Velodyne16Decoder >(new Velodyne16Decoder(m_velodyneSharedMemory, getConference(), getKeyValueConfiguration().getValue< string >("proxy-velodyne16.calibration"),false));
}
else{
m_velodyne16decoder = shared_ptr< Velodyne16Decoder >(new Velodyne16Decoder(m_velodyneSharedMemory, getConference(), getKeyValueConfiguration().getValue< string >("proxy-velodyne16.calibration"),true));
}
}
else {
m_velodyne16decoderCPC = shared_ptr< Velodyne16DecoderCPC >(new Velodyne16DecoderCPC(getConference()));
m_udpreceiver->setStringListener(m_velodyne16decoderCPC.get());
// Start receiving bytes.
m_udpreceiver->start();
else if(m_pointCloudOption==1){
m_velodyne16decoder = shared_ptr< Velodyne16Decoder >(new Velodyne16Decoder(getConference()));
}
else{
throw std::invalid_argument( "Invalid point cloud option! 0: shared point cloud (SPC) only; 1: compact point cloud (CPC) only; 2: both SPC and CPC" );
}

m_udpreceiver->setStringListener(m_velodyne16decoder.get());
// Start receiving bytes.
m_udpreceiver->start();
}

void ProxyVelodyne16::tearDown() {
Expand Down
Loading

0 comments on commit ad1cc61

Please sign in to comment.