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 #74 from chalmers-revere/pre-release
Browse files Browse the repository at this point in the history
Pre release
  • Loading branch information
chrberger authored Dec 14, 2016
2 parents ad1cc61 + e98b4b3 commit 03507ac
Show file tree
Hide file tree
Showing 20 changed files with 94 additions and 53 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.8.0 - Supporting new messages from CAN dbc file
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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.1
0.8.0
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 "07 December 2016" "0.7.1" "opendlv-core-system-health man page"
.TH opendlv-core-system-health 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-applanix man page"
.TH opendlv-core-proxy-applanix 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-camera-axis man page"
.TH opendlv-core-proxy-camera-axis 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-camera man page"
.TH opendlv-core-proxy-camera 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-fh16truck man page"
.TH opendlv-core-proxy-fh16truck 1 "13 December 2016" "0.8.0" "opendlv-core-proxy-fh16truck man page"

.SH NAME
opendlv-core-proxy-fh16truck \- This tool interfaces with the FH16 truck.
Expand Down
14 changes: 7 additions & 7 deletions code/core/system/proxy-fh16/src/CANMessageDataStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ void CanMessageDataStore::add(odcore::data::Container &container) {
}

const float steering = actuationRequest.getSteering();
opendlv::proxy::reverefh16::SteeringRequest steeringRequest;
steeringRequest.setEnableRequest(m_enabled);
steeringRequest.setSteeringRoadWheelAngle(steering);
opendlv::proxy::reverefh16::SteerRequest steerRequest;
steerRequest.setEnableRequest(m_enabled);
steerRequest.setSteeringRoadWheelAngle(steering);

// Must be 33.535 to disable deltatorque.
steeringRequest.setSteeringDeltaTorque(33.535);
odcore::data::Container steeringRequestContainer(steeringRequest);
steerRequest.setSteeringDeltaTorque(33.535);
odcore::data::Container steerRequestContainer(steerRequest);

canmapping::opendlv::proxy::reverefh16::SteeringRequest steeringRequestMapping;
automotive::GenericCANMessage genericCanMessage = steeringRequestMapping.encode(steeringRequestContainer);
canmapping::opendlv::proxy::reverefh16::SteerRequest steerRequestMapping;
automotive::GenericCANMessage genericCanMessage = steerRequestMapping.encode(steerRequestContainer);
m_canDevice->write(genericCanMessage);
}
}
Expand Down
28 changes: 14 additions & 14 deletions code/core/system/proxy-fh16/src/ProxyFH16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ void ProxyFH16::setUpRecordingMappedGenericCANMessage(const string &timeStampFor
{
stringstream fileName;
fileName << "CID-" << getCID() << "_"
<< "can_mapped_data_id-" << opendlv::proxy::reverefh16::ManualControl::ID() << "_" << timeStampForFileName << ".csv";
<< "can_mapped_data_id-" << opendlv::proxy::reverefh16::ManualDriver::ID() << "_" << timeStampForFileName << ".csv";

// Create map of CSV transformers.
fstream *f = new fstream(fileName.str(), ios::out);

// Log ManualControl.
m_mapOfCSVFiles[opendlv::proxy::reverefh16::ManualControl::ID()] = shared_ptr< fstream >(f);
m_mapOfCSVVisitors[opendlv::proxy::reverefh16::ManualControl::ID()] = shared_ptr< CSVFromVisitableVisitor >(new CSVFromVisitableVisitor(*f));
// Log ManualDriver.
m_mapOfCSVFiles[opendlv::proxy::reverefh16::ManualDriver::ID()] = shared_ptr< fstream >(f);
m_mapOfCSVVisitors[opendlv::proxy::reverefh16::ManualDriver::ID()] = shared_ptr< CSVFromVisitableVisitor >(new CSVFromVisitableVisitor(*f));
}

{
Expand All @@ -177,14 +177,14 @@ void ProxyFH16::setUpRecordingMappedGenericCANMessage(const string &timeStampFor
{
stringstream fileName;
fileName << "CID-" << getCID() << "_"
<< "can_mapped_data_id-" << opendlv::proxy::reverefh16::Propulsion::ID() << "_" << timeStampForFileName << ".csv";
<< "can_mapped_data_id-" << opendlv::proxy::reverefh16::VehicleSpeed::ID() << "_" << timeStampForFileName << ".csv";

// Create map of CSV transformers.
fstream *f = new fstream(fileName.str(), ios::out);

// Log Propulsion.
m_mapOfCSVFiles[opendlv::proxy::reverefh16::Propulsion::ID()] = shared_ptr< fstream >(f);
m_mapOfCSVVisitors[opendlv::proxy::reverefh16::Propulsion::ID()] = shared_ptr< CSVFromVisitableVisitor >(new CSVFromVisitableVisitor(*f));
// Log VehicleSpeed.
m_mapOfCSVFiles[opendlv::proxy::reverefh16::VehicleSpeed::ID()] = shared_ptr< fstream >(f);
m_mapOfCSVVisitors[opendlv::proxy::reverefh16::VehicleSpeed::ID()] = shared_ptr< CSVFromVisitableVisitor >(new CSVFromVisitableVisitor(*f));
}
}
}
Expand All @@ -211,13 +211,13 @@ void ProxyFH16::disableCANRequests() {
m_device->write(genericCanMessage);

// Disable steering.
opendlv::proxy::reverefh16::SteeringRequest steeringRequest;
opendlv::proxy::reverefh16::SteerRequest steeringRequest;
steeringRequest.setEnableRequest(false);
steeringRequest.setSteeringRoadWheelAngle(0.0);
steeringRequest.setSteeringDeltaTorque(0.0);
Container steeringRequestContainer(steeringRequest);

canmapping::opendlv::proxy::reverefh16::SteeringRequest steeringRequestMapping;
canmapping::opendlv::proxy::reverefh16::SteerRequest steeringRequestMapping;
genericCanMessage = steeringRequestMapping.encode(steeringRequestContainer);
m_device->write(genericCanMessage);
}
Expand Down Expand Up @@ -342,8 +342,8 @@ void ProxyFH16::dumpCSVData(Container &c) {
if ((m_mapOfCSVFiles.count(c.getDataType()) == 1) &&
(m_mapOfCSVVisitors.count(c.getDataType()) == 1)) {
// We have a CSV file and a transformation available.
if (c.getDataType() == opendlv::proxy::reverefh16::ManualControl::ID()) {
opendlv::proxy::reverefh16::ManualControl temp = c.getData< opendlv::proxy::reverefh16::ManualControl >();
if (c.getDataType() == opendlv::proxy::reverefh16::ManualDriver::ID()) {
opendlv::proxy::reverefh16::ManualDriver temp = c.getData< opendlv::proxy::reverefh16::ManualDriver >();
MessageFromVisitableVisitor mfvv;
temp.accept(mfvv);
Message m = mfvv.getMessage();
Expand All @@ -358,8 +358,8 @@ void ProxyFH16::dumpCSVData(Container &c) {
m.addField(m_receivedTS_ptr);
m.accept(*m_mapOfCSVVisitors[c.getDataType()]);
}
if (c.getDataType() == opendlv::proxy::reverefh16::Propulsion::ID()) {
opendlv::proxy::reverefh16::Propulsion temp = c.getData< opendlv::proxy::reverefh16::Propulsion >();
if (c.getDataType() == opendlv::proxy::reverefh16::VehicleSpeed::ID()) {
opendlv::proxy::reverefh16::VehicleSpeed temp = c.getData< opendlv::proxy::reverefh16::VehicleSpeed >();
MessageFromVisitableVisitor mfvv;
temp.accept(mfvv);
Message m = mfvv.getMessage();
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 "07 December 2016" "0.7.1" "opendlv-core-proxy-imu man page"
.TH opendlv-core-proxy-imu 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-ledstrip man page"
.TH opendlv-core-proxy-ledstrip 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-sick man page"
.TH opendlv-core-proxy-sick 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-trimble man page"
.TH opendlv-core-proxy-trimble 1 "13 December 2016" "0.8.0" "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 "07 December 2016" "0.7.1" "opendlv-core-proxy-v2v man page"
.TH opendlv-core-proxy-v2v 1 "13 December 2016" "0.8.0" "opendlv-core-proxy-v2v man page"

.SH NAME
opendlv-core-proxy-v2v \- This tool interfaces with a V2V unit.
Expand Down
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 "07 December 2016" "0.7.1" "opendlv-core-proxy-velodyne man page"
.TH opendlv-core-proxy-velodyne16 1 "13 December 2016" "0.8.0" "opendlv-core-proxy-velodyne man page"

.SH NAME
opendlv-core-proxy-velodyne16 \- 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-velodyne
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-proxy-velodyne 1 "07 December 2016" "0.7.1" "opendlv-core-proxy-velodyne man page"
.TH opendlv-core-proxy-velodyne 1 "13 December 2016" "0.8.0" "opendlv-core-proxy-velodyne man page"

.SH NAME
opendlv-core-proxy-velodyne \- 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-ps3controller
.\" Author: Christian Berger <[email protected]>.

.TH opendlv-core-ps3controller 1 "07 December 2016" "0.7.1" "opendlv-core-ps3controller man page"
.TH opendlv-core-ps3controller 1 "13 December 2016" "0.8.0" "opendlv-core-ps3controller man page"

.SH NAME
opendlv-core-ps3controller \- This tool interfaces with the FH16 truck.
Expand Down
33 changes: 27 additions & 6 deletions resources/can/fh16gw.dbc → resources/can/fh16gw_v6.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,19 @@ BS_:
BU_: Chalmers VehicleGateWay


BO_ 264 Driveline: 5 Vector__XXX
SG_ EngineTorque : 16|16@1+ (1,0) [0|0] "Nm" Vector__XXX
SG_ EngineSpeed : 0|16@1+ (0.125,0) [0|0] "rpm" Vector__XXX
SG_ CurrentGear : 32|8@1+ (1,-125) [-125|130] "" Vector__XXX
BO_ 272 Trailer: 8 VehicleGateWay

BO_ 262 ManualDriver: 4 VehicleGateWay
BO_ 265 EnergyLevels: 3 VehicleGateWay
SG_ BatterySOC : 16|8@1+ (0.5,0) [0|0] "Percent" Vector__XXX
SG_ FuelLevel : 0|10@1+ (1,0) [0|350] "l" Vector__XXX

BO_ 264 Driveline: 5 VehicleGateWay
SG_ EngineTorque : 16|16@1+ (1,0) [0|4000] "Nm" Vector__XXX
SG_ EngineSpeed : 0|16@1+ (0.125,0) [0|8191.875] "rpm" Vector__XXX
SG_ CurrentGear : 32|8@1+ (1,-125) [-4|12] "GearValue" Vector__XXX

BO_ 262 ManualDriver: 5 VehicleGateWay
SG_ Doors : 32|3@1+ (1,0) [0|0] "" Vector__XXX
SG_ TorsionBarTorque : 16|16@1+ (0.0009765625,-32) [-32|31.9990234375] "Nm" Vector__XXX
SG_ BrakePedalPosition : 8|8@1+ (0.4,0) [0|102] "Percent" Vector__XXX
SG_ AccelerationPedalPosition : 0|8@1+ (0.4,0) [0|102] "Percent" Vector__XXX
Expand Down Expand Up @@ -88,6 +95,14 @@ BO_ 257 WheelSpeeds1: 8 VehicleGateWay



CM_ SG_ 262 Doors "0 - Idle
1 - Both doors closed
2 - Driver door opened
3 - Passenger door opend
4 - Both doors opened
5-7 Error";
CM_ SG_ 514 BrakeRequest "abs(BrakeRequest.phys) > 0.05 m/s^2 to actually apply brakes.
This means Enable_BrakeRequest can be active without sending smal brake request to brakeECU.";
CM_ SG_ 263 SteeringWheelAngle "65024 - 65279 Error ; 65280 - 65535 Not available";
CM_ SG_ 261 DriveAxle2Load "65024 - 65279 Error ; 65280 - 65535 Not available";
CM_ SG_ 261 DriveAxle1Load "65024 - 65279 Error ; 65280 - 65535 Not available";
Expand All @@ -111,6 +126,9 @@ BA_DEF_DEF_ "GenSigStartValue" 0;
BA_DEF_DEF_ "GenMsgSendType" "Cyclic";
BA_DEF_DEF_ "GenMsgCycleTime" 0;
BA_DEF_DEF_ "BusType" "CAN";
BA_ "GenMsgCycleTime" BO_ 272 20;
BA_ "GenMsgCycleTime" BO_ 265 20;
BA_ "GenMsgCycleTime" BO_ 264 20;
BA_ "GenMsgCycleTime" BO_ 262 10;
BA_ "GenMsgCycleTime" BO_ 515 10;
BA_ "GenMsgCycleTime" BO_ 514 10;
Expand All @@ -121,9 +139,12 @@ BA_ "GenMsgCycleTime" BO_ 260 10;
BA_ "GenMsgCycleTime" BO_ 259 100;
BA_ "GenMsgCycleTime" BO_ 258 10;
BA_ "GenMsgCycleTime" BO_ 257 20;
BA_ "GenSigStartValue" SG_ 265 BatterySOC 255;
BA_ "GenSigStartValue" SG_ 264 EngineSpeed 65535;
BA_ "GenSigStartValue" SG_ 264 CurrentGear 125;
BA_ "GenSigStartValue" SG_ 262 BrakePedalPosition 255;
BA_ "GenSigStartValue" SG_ 262 AccelerationPedalPosition 255;
BA_ "GenSigStartValue" SG_ 515 AccelerationRequestPedal 255;
BA_ "GenSigStartValue" SG_ 263 SteeringWheelAngle 65535;
BA_ "GenSigStartValue" SG_ 263 SteeringWheelAngle 32126.976;
BA_ "GenSigStartValue" SG_ 263 RoadWheelAngle 32765.3997378768;

28 changes: 20 additions & 8 deletions resources/can/fh16mapping.can
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ using ODVDFH16Truck;
// In the following, all interesting CAN signals are listed.
///////////////////////////////////////////////////////////////////////////////

driveline.enginetorque in 0x108 at bit 16 for 16 bit is unsigned little endian multiply by 1 add 0 with range [0, 0];
driveline.enginespeed in 0x108 at bit 0 for 16 bit is unsigned little endian multiply by 0.125 add 0 with range [0, 0];
driveline.currentgear in 0x108 at bit 32 for 8 bit is unsigned little endian multiply by 1 add -125 with range [-125, 130];
// CAN message for energy level information.
energylevels.batterysoc in 0x109 at bit 16 for 8 bit is unsigned little endian multiply by 0.5 add 0 with range [0, 0];
energylevels.fuellevel in 0x109 at bit 0 for 10 bit is unsigned little endian multiply by 1 add 0 with range [0, 350];

// CAN message for driveline information.
driveline.enginetorque in 0x108 at bit 16 for 16 bit is unsigned little endian multiply by 1 add 0 with range [0, 4000];
driveline.enginespeed in 0x108 at bit 0 for 16 bit is unsigned little endian multiply by 0.125 add 0 with range [0, 8191.875];
driveline.currentgear in 0x108 at bit 32 for 8 bit is unsigned little endian multiply by 1 add -125 with range [-4, 12];

// CAN message for manual driver.
manualdriver.doors in 0x106 at bit 32 for 3 bit is unsigned little endian multiply by 1 add 0 with range [0, 0];
manualdriver.torsionbartorque in 0x106 at bit 16 for 16 bit is unsigned little endian multiply by 0.0009765625 add -32 with range [-32, 31.9990234375];
manualdriver.brakepedalposition in 0x106 at bit 8 for 8 bit is unsigned little endian multiply by 0.4 add 0 with range [0, 102];
manualdriver.accelerationpedalposition in 0x106 at bit 0 for 8 bit is unsigned little endian multiply by 0.4 add 0 with range [0, 102];
Expand Down Expand Up @@ -72,16 +78,22 @@ wheelspeeds1.frontaxle1wheelspeedleft in 0x101 at bit 0 for 16 bit is unsigned l
// made available as soon as all required CAN signals have been received
// from the low-level CAN receiver regardless of the received order.
///////////////////////////////////////////////////////////////////////////////
mapping opendlv.proxy.reverefh16.Driveline {
unordered mapping opendlv.proxy.reverefh16.Energylevels {
energylevels.batterysoc : 1;
energylevels.fuellevel : 2;
}

unordered mapping opendlv.proxy.reverefh16.Driveline {
driveline.enginetorque : 1;
driveline.enginespeed : 2;
driveline.currentgear : 3;
}

unordered mapping opendlv.proxy.reverefh16.ManualControl {
unordered mapping opendlv.proxy.reverefh16.ManualDriver {
manualdriver.accelerationpedalposition : 1;
manualdriver.brakepedalposition : 2;
manualdriver.torsionbartorque : 3;
manualdriver.doors : 4;
}

unordered mapping opendlv.proxy.reverefh16.AccelerationRequest {
Expand All @@ -94,7 +106,7 @@ unordered mapping opendlv.proxy.reverefh16.BrakeRequest {
brakerequest.brakerequest : 2;
}

unordered mapping opendlv.proxy.reverefh16.SteeringRequest {
unordered mapping opendlv.proxy.reverefh16.SteerRequest {
steerrequest.enable_steerreq : 1;
steerrequest.steerreq_rwa : 2;
steerrequest.steerreq_deltatrq : 3;
Expand All @@ -106,11 +118,11 @@ unordered mapping opendlv.proxy.reverefh16.Axles {
axleloads.driveaxle2load : 3;
}

unordered mapping opendlv.proxy.reverefh16.Propulsion {
unordered mapping opendlv.proxy.reverefh16.VehicleSpeed {
vehiclespeed.vehiclespeedpropshaft : 1;
}

unordered mapping opendlv.proxy.reverefh16.VehicleState {
unordered mapping opendlv.proxy.reverefh16.VehicleDynamics {
vehicledynamics.acceleration_x : 1;
vehicledynamics.acceleration_y : 2;
vehicledynamics.yawrate : 3;
Expand Down
Loading

0 comments on commit 03507ac

Please sign in to comment.