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

Commit

Permalink
Merge pull request #125 from chalmers-revere/2016Q4.refactoring.dbc
Browse files Browse the repository at this point in the history
2016 q4.refactoring.dbc
  • Loading branch information
chrberger authored Dec 14, 2016
2 parents 5ac1311 + d8d0538 commit 32fba7f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.4.0 - Changes due to Rhino's updated DBC file
0.3.0 - Propagating OpenDLV.core v0.7.1 release
0.2.0 - Updated underlying base image.
0.1.0 - Update to new OpenDLV.core base image
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
0.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ void Intersection::nextContainer(odcore::data::Container &a_container)
} else if (a_container.getDataType() == opendlv::perception::Environment::ID()) {
opendlv::perception::Environment message = a_container.getData<opendlv::perception::Environment>();
ActOnEnvironment(message);
} else if (a_container.getDataType() == opendlv::proxy::reverefh16::Propulsion::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::Propulsion>();
} else if (a_container.getDataType() == opendlv::proxy::reverefh16::VehicleSpeed::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::VehicleSpeed>();
double speedKph = propulsion.getPropulsionShaftVehicleSpeed();
float speed = static_cast<float>(speedKph / 3.6);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ void Platoon::receivedContainerMergeScenario(odcore::data::Container &a_containe

//m_speed = 7; // hardcoded for testing

if (a_container.getDataType() == opendlv::proxy::reverefh16::Propulsion::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::Propulsion>();
if (a_container.getDataType() == opendlv::proxy::reverefh16::VehicleSpeed::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::VehicleSpeed>();
double speedKph = propulsion.getPropulsionShaftVehicleSpeed();
m_speed = (float) speedKph / 3.6f;
}
Expand Down
4 changes: 2 additions & 2 deletions code/system/application/knowledge/src/ivrule/ivrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ void Ivrule::nextContainer(odcore::data::Container &a_container)
if(a_container.getDataType() == opendlv::perception::Environment::ID()) {
opendlv::perception::Environment message = a_container.getData<opendlv::perception::Environment>();
ReadEnvironment(message);
} else if (a_container.getDataType() == opendlv::proxy::reverefh16::Propulsion::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::Propulsion>();
} else if (a_container.getDataType() == opendlv::proxy::reverefh16::VehicleSpeed::ID()) {
auto propulsion = a_container.getData<opendlv::proxy::reverefh16::VehicleSpeed>();
double speedKph = propulsion.getPropulsionShaftVehicleSpeed();
m_speed = static_cast<float>(speedKph / 3.6);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Geolocation
opendlv::proxy::MagnetometerReading m_magnetometerReading;
opendlv::proxy::AccelerometerReading m_accelerometerReading;
opendlv::proxy::reverefh16::Steering m_steeringReading;
opendlv::proxy::reverefh16::Propulsion m_propulsionReading;
opendlv::proxy::reverefh16::VehicleSpeed m_propulsionReading;

bool m_debug;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ void Geolocation::nextContainer(odcore::data::Container &a_c)
m_accelerometerReading = a_c.getData<opendlv::proxy::AccelerometerReading>();
} else if(a_c.getDataType() == opendlv::proxy::reverefh16::Steering::ID()) {
m_steeringReading = a_c.getData<opendlv::proxy::reverefh16::Steering>();
} else if(a_c.getDataType() == opendlv::proxy::reverefh16::Propulsion::ID()) {
m_propulsionReading = a_c.getData<opendlv::proxy::reverefh16::Propulsion>();
} else if(a_c.getDataType() == opendlv::proxy::reverefh16::VehicleSpeed::ID()) {
m_propulsionReading = a_c.getData<opendlv::proxy::reverefh16::VehicleSpeed>();
}
}

Expand Down Expand Up @@ -245,17 +245,17 @@ odcore::data::dmcp::ModuleExitCodeMessage::ModuleExitCode Geolocation::body()
odcore::data::TimeStamp durationAfterGpsReading = timeAfterGpsReading - now;
auto propulsionContainer = getKeyValueDataStore().get(
opendlv::proxy::reverefh16::Propulsion::ID());
opendlv::proxy::reverefh16::VehicleSpeed::ID());
auto propulsion = propulsionContainer.getData<
opendlv::proxy::reverefh16::Propulsion>();
opendlv::proxy::reverefh16::VehicleSpeed>();
if (propulsionContainer.getReceivedTimeStamp().getSeconds() > 0) {
control.v() = propulsion.getPropulsionShaftVehicleSpeed()/3.6;
control.v() = propulsion.getVehicleSpeedShaftVehicleSpeed()/3.6;
// TODO: to m/s --- get the message in si unit
}
if (propulsion.getPropulsionShaftVehicleSpeed() < 0.1) {
if (propulsion.getVehicleSpeedShaftVehicleSpeed() < 0.1) {
control.v() = 0.0;
// if we don't get any data from the CAN,
// we try to fill the speed from GPS data
Expand Down
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
###############################################################################
# Parameters for this Makefile.
BASE_IMAGE=seresearch/opendlv-core-on-opendavinci-ubuntu-16.04-complete
BASE_IMAGE_VERSION=v0.7.1
BASE_IMAGE_VERSION=v0.8.0

###############################################################################
# Tools.
Expand Down

0 comments on commit 32fba7f

Please sign in to comment.