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 #126 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 cc8c0e2 + 32fba7f commit 188ec37
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 81 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ ExternalProject_Add(system
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}"
CMAKE_ARGS "-DOPENDAVINCI_DIR=${OPENDAVINCI_DIR}"
CMAKE_ARGS "-DODVDVEHICLE_DIR=${ODVDVEHICLE_DIR}"
CMAKE_ARGS "-DODVDFH16TRUCK_DIR=${ODVDFH16TRUCK_DIR}"
CMAKE_ARGS "-DODVDTRIMBLE_DIR=${ODVDTRIMBLE_DIR}"
CMAKE_ARGS "-DODVDIMU_DIR=${ODVDIMU_DIR}"
CMAKE_ARGS "-DCXXTEST_INCLUDE_DIR=${CXXTEST_INCLUDE_DIR}"
Expand All @@ -139,6 +140,7 @@ ExternalProject_Add(tools
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}"
CMAKE_ARGS "-DOPENDAVINCI_DIR=${OPENDAVINCI_DIR}"
CMAKE_ARGS "-DODVDVEHICLE_DIR=${ODVDVEHICLE_DIR}"
CMAKE_ARGS "-DODVDFH16TRUCK_DIR=${ODVDFH16TRUCK_DIR}"
CMAKE_ARGS "-DCXXTEST_INCLUDE_DIR=${CXXTEST_INCLUDE_DIR}"
CMAKE_ARGS "-DEIGEN3_INCLUDE_DIR=${OPENDAVINCI_DIR}/include/opendavinci"
CMAKE_ARGS "-DKALMAN_INCLUDE_DIR=${KALMAN_INCLUDE_DIR}"
Expand Down
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
6 changes: 6 additions & 0 deletions code/system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ find_package(ODVDOpenDLVData REQUIRED)
SET (CMAKE_MODULE_PATH "${ODVDVEHICLE_DIR}/share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules" ${CMAKE_MODULE_PATH})
FIND_PACKAGE (ODVDVehicle REQUIRED)

###########################################################################
# Find ODVDVehicle.
SET (CMAKE_MODULE_PATH "${ODVDFH16TRUCK_DIR}/share/cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}/Modules" ${CMAKE_MODULE_PATH})
FIND_PACKAGE (ODVDFH16Truck REQUIRED)

###########################################################################
# Find ODVDTrimble.
Expand All @@ -74,6 +78,7 @@ INCLUDE_DIRECTORIES(SYSTEM ${AUTOMOTIVEDATA_INCLUDE_DIRS})
include_directories(SYSTEM ${OPENDAVINCI_INCLUDE_DIRS})
include_directories(SYSTEM ${OPENDLV_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${ODVDVEHICLE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${ODVDFH16TRUCK_INCLUDE_DIRS})
include_directories(SYSTEM ${ODVDOPENDLVDATA_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${ODVDTRIMBLE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${ODVDIMU_INCLUDE_DIRS})
Expand All @@ -87,6 +92,7 @@ set(LIBRARIES ${OPENDAVINCI_LIBRARIES}
${OPENDLV_LIBRARIES}
${AUTOMOTIVEDATA_LIBRARIES}
${ODVDVEHICLE_LIBRARIES}
${ODVDFH16TRUCK_LIBRARIES}
${ODVDOPENDLVDATA_LIBRARIES}
${ODVDTRIMBLE_LIBRARIES}
${ODVDIMU_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion code/system/application/action/src/act/act.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "opendavinci/odcore/data/Container.h"
#include "opendavinci/odcore/data/TimeStamp.h"

#include "odvdopendlvdata/GeneratedHeaders_ODVDOpenDLVData.h"
#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>

#include "act/act.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "opendavinci/odcore/data/Container.h"
#include "opendavinci/odcore/data/TimeStamp.h"

#include "odvdopendlvdata/GeneratedHeaders_ODVDOpenDLVData.h"
#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>

#include "opendavinci/odcore/strings/StringToolbox.h"

Expand Down 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 @@ -25,7 +25,7 @@
#include "opendavinci/odcore/data/Container.h"
#include "opendavinci/odcore/data/TimeStamp.h"

#include "odvdopendlvdata/GeneratedHeaders_ODVDOpenDLVData.h"
#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>

#include "opendavinci/odcore/strings/StringToolbox.h"

Expand Down 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
6 changes: 3 additions & 3 deletions code/system/application/knowledge/src/ivrule/ivrule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <iostream>

#include "opendavinci/odcore/data/TimeStamp.h"
#include "odvdopendlvdata/GeneratedHeaders_ODVDOpenDLVData.h"
#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>

namespace opendlv {
namespace knowledge {
Expand Down 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 @@ -30,6 +30,7 @@
#include "geolocation/kinematicmodel.hpp"
#include "geolocation/kinematicobservationmodel.hpp"

#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>
#include "odvdopendlvdata/GeneratedHeaders_ODVDOpenDLVData.h"
#include "odvdtrimble/GeneratedHeaders_ODVDTrimble.h"
#include "odvdimu/GeneratedHeaders_ODVDIMU.h"
Expand Down Expand Up @@ -81,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 @@ -30,8 +30,7 @@
#include <opendavinci/odcore/data/TimeStamp.h>


// #include "opendlv/data/environment/Point3.h"
// #include <fh16mapping/GeneratedHeaders_fh16mapping.h>
#include <odvdfh16truck/GeneratedHeaders_ODVDFH16Truck.h>

#include "geolocation/geolocation.hpp"

Expand Down Expand Up @@ -96,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 @@ -246,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
2 changes: 1 addition & 1 deletion docker/completeBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cd /opt/opendlv.build
echo "[opendlv Docker builder] Complete build."
cmake -E remove_directory .
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH cmake -D CXXTEST_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/cxxtest -D OPENDAVINCI_DIR=/opt/od4 -D ODVDVEHICLE_DIR=/opt/opendlv.core -D ODVDTRIMBLE_DIR=/opt/opendlv.core -D ODVDIMU_DIR=/opt/opendlv.core -D KALMAN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/kalman/include -D TINYCNN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/tiny-cnn -D CMAKE_INSTALL_PREFIX=/opt/opendlv /opt/opendlv.sources
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH cmake -D CXXTEST_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/cxxtest -D OPENDAVINCI_DIR=/opt/od4 -D ODVDVEHICLE_DIR=/opt/opendlv.core -D ODVDFH16TRUCK_DIR=/opt/opendlv.core -D ODVDTRIMBLE_DIR=/opt/opendlv.core -D ODVDIMU_DIR=/opt/opendlv.core -D KALMAN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/kalman/include -D TINYCNN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/tiny-cnn -D CMAKE_INSTALL_PREFIX=/opt/opendlv /opt/opendlv.sources
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH make -j4
EOF

Expand Down
2 changes: 1 addition & 1 deletion docker/incrementalBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cd /opt/opendlv.build
echo "[opendlv Docker builder] Incremental build."
mkdir -p build.system && cd build.system
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH cmake -D CXXTEST_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/cxxtest -D OPENDAVINCI_DIR=/opt/od4 -D ODVDVEHICLE_DIR=/opt/opendlv.core -D ODVDTRIMBLE_DIR=/opt/opendlv.core -D ODVDIMU_DIR=/opt/opendlv.core -D EIGEN3_INCLUDE_DIR=/opt/od4/include/opendavinci -D KALMAN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/kalman/include -D TINYCNN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/tiny-cnn -D CMAKE_INSTALL_PREFIX=/opt/opendlv /opt/opendlv.sources/code/system
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH cmake -D CXXTEST_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/cxxtest -D OPENDAVINCI_DIR=/opt/od4 -D ODVDVEHICLE_DIR=/opt/opendlv.core -D ODVDFH16TRUCK_DIR=/opt/opendlv.core -D ODVDTRIMBLE_DIR=/opt/opendlv.core -D ODVDIMU_DIR=/opt/opendlv.core -D EIGEN3_INCLUDE_DIR=/opt/od4/include/opendavinci -D KALMAN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/kalman/include -D TINYCNN_INCLUDE_DIR=/opt/opendlv.sources/thirdparty/tiny-cnn -D CMAKE_INSTALL_PREFIX=/opt/opendlv /opt/opendlv.sources/code/system
CCACHE_DIR=/opt/ccache PATH=/usr/lib/ccache:/opt/od4/bin:$PATH make -j4 && make test && make install
EOF
Expand Down
59 changes: 1 addition & 58 deletions resources/odvd/ODVDOpenDLVData.odvd
Original file line number Diff line number Diff line change
Expand Up @@ -256,65 +256,8 @@ message opendlv.action.Correction [id = 186] {
float amplitude [id = 4];
}

message opendlv.proxy.reverefh16.ManualControl [id = 191] {
double accelerationPedalPosition [id = 1];
double brakePedalPosition [id = 2];
double torsionBarTorque [id = 3];
odcore::data::TimeStamp fromSensor [id = 4];
}

message opendlv.proxy.reverefh16.AccelerationRequest [id = 192] {
bool enableRequest [id = 1];
double accelerationPedalPosition [id = 2];
}

message opendlv.proxy.reverefh16.BrakeRequest [id = 193] {
bool enableRequest [id = 1];
double brake [id = 2];
}

message opendlv.proxy.reverefh16.SteeringRequest [id = 194] {
bool enableRequest [id = 1];
double steeringRoadWheelAngle [id = 2];
double steeringDeltaTorque [id = 3];
}

message opendlv.proxy.reverefh16.Axles [id = 195] {
double loadAxle11 [id = 1];
double loadAxle12 [id = 2];
double loadAxle13 [id = 3];
odcore::data::TimeStamp fromSensor [id = 4];
}

message opendlv.proxy.reverefh16.Propulsion [id = 196] {
double propulsionShaftVehicleSpeed [id = 1];
odcore::data::TimeStamp fromSensor [id = 2];
}

message opendlv.proxy.reverefh16.VehicleState [id = 197] {
double accelerationX [id = 1];
double accelerationY [id = 2];
double yawRate [id = 3];
odcore::data::TimeStamp fromSensor [id = 4];
}

message opendlv.proxy.reverefh16.Wheels [id = 198] {
double speedWheel111 [id = 1];
double speedWheel112 [id = 2];
double speedWheel121 [id = 3];
double speedWheel122 [id = 4];
double speedWheel131 [id = 5];
double speedWheel132 [id = 6];
odcore::data::TimeStamp fromSensor [id = 7];
}

message opendlv.proxy.reverefh16.Steering [id = 199] {
double roadwheelangle [id = 1];
double steeringwheelangle [id = 2];
odcore::data::TimeStamp fromSensor [id = 3];
}

// This message broadcasts the system's health as key/values.
message opendlv.system.diagnostics.HealthStatus [id = 200] {
map<string,string> status [id = 1];
}

0 comments on commit 188ec37

Please sign in to comment.