Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/rock-simulation/mars into s…
Browse files Browse the repository at this point in the history
…murfa
  • Loading branch information
hwiedPro committed May 6, 2019
2 parents 61d1fd7 + 1add753 commit 1f20aac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
5 changes: 3 additions & 2 deletions common/data_broker/src/DataBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace mars {
elementsLock.lockForRead();
elementIt = elementsByName.find(std::make_pair(pendingIt->groupName,
pendingIt->dataName));
if(elementIt == elementsByName.end()) {
if(elementIt != elementsByName.end()) {
DataElement *element = elementIt->second;
TimedReceiver timedReceiver = {pendingIt->receiver, element,
pendingIt->updatePeriod,
Expand Down Expand Up @@ -510,7 +510,8 @@ namespace mars {
pendingRegistrationLock.lock();
for(pendingIt = pendingTimedRegistrations.begin();
pendingIt != pendingTimedRegistrations.end(); /* do nothing */) {
if((pendingIt->timerName == timerName) &&
if((pendingIt->receiver == receiver) &&
(pendingIt->timerName == timerName) &&
matchPattern(groupName, pendingIt->groupName) &&
matchPattern(dataName, pendingIt->dataName)) {
pendingIt = pendingTimedRegistrations.erase(pendingIt);
Expand Down
10 changes: 10 additions & 0 deletions common/graphics/osg_terrain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ find_package(OpenSceneGraph REQUIRED osgDB osgText osgUtil)
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
link_directories(${OPENSCENEGRAPH_LIBRARY_DIRS})

if(WIN32)
# this fixes the error 998 from the LibManager
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-auto-import")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-auto-import")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
else(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(WIN32)

set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENSCENEGRAPH_INCLUDE_DIRS})
CHECK_INCLUDE_FILE_CXX("osg/Version" HAVE_OSG_VERSION_H)
if(${HAVE_OSG_VERSION_H})
Expand Down
5 changes: 3 additions & 2 deletions sim/src/sensors/CameraSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace mars {

control->nodes->addNodeSensor(this);
std::string groupName, dataName;
this->config.ori_offset = this->config.ori_offset * eulerToQuaternion(Vector(90,0,-90)); //All elements should be X Forwart looging to meet rock-convention, so i add this offset for all setting
//this->config.ori_offset = this->config.ori_offset * eulerToQuaternion(Vector(90,0,-90)); //All elements should be X Forwart looging to meet rock-convention, so i add this offset for all setting

bool found = control->nodes->getDataBrokerNames(attached_node, &groupName, &dataName);
assert(found);
Expand Down Expand Up @@ -330,7 +330,8 @@ namespace mars {
// todo: use pos_offset here too
Vector p = control->graphics->getDrawObjectPosition(draw_id);
Quaternion qcorrect = Quaternion(0.5, 0.5, -0.5, -0.5);
Quaternion q = control->graphics->getDrawObjectQuaternion(draw_id) * qcorrect;
Quaternion q = control->graphics->getDrawObjectQuaternion(draw_id) * config.ori_offset * qcorrect;
p += (control->graphics->getDrawObjectQuaternion(draw_id) * config.pos_offset);
gc->updateViewportQuat(p.x(), p.y(), p.z(),
q.x(), q.y(),
q.z(), q.w());
Expand Down

0 comments on commit 1f20aac

Please sign in to comment.