Permalink
Browse files

simtime for ros2gams - still wip

  • Loading branch information...
auerj committed Aug 18, 2018
1 parent 6978349 commit 1f00cf779107239e85d81c96e92b0a683a626ae8
Showing with 7 additions and 7 deletions.
  1. +1 −1 gams.mpc
  2. +2 −6 src/gams/utility/ros/RosParser.cpp
  3. +1 −0 src/gams/utility/ros/RosParser.h
  4. +3 −0 using_simtime.mpb
@@ -213,7 +213,7 @@ project (gams_controller) : using_gams, using_madara, using_vrep {
}
}
project (ros2gams) : using_madara, using_ros, using_gams, using_capnp {
project (ros2gams) : using_madara, using_ros, using_gams, using_capnp, using_simtime {
exeout = $(GAMS_ROOT)/bin
exename = ros2gams
libpaths += $(ROS_ROOT)/../../lib
@@ -6,10 +6,6 @@
**/
#include "RosParser.h"
#include <cmath>
#include "madara/utility/SimTime.h"
gams::utility::ros::RosParser::RosParser (knowledge::KnowledgeBase * kb,
std::string world_frame, std::string base_frame,
@@ -1001,8 +997,8 @@ void gams::utility::ros::RosParser::parse_any (const rosbag::MessageInstance & m
void gams::utility::ros::RosParser::set_sim_time(global_ros::Time rostime)
{
uint64_t sim_time = rostime.sec * 10e9 + rostime.nsec;
madara::utility::SimTime::sim_time_notify(sim_time, 0);
uint64_t sim_time = rostime.sec * 1e9 + rostime.nsec;
madara::utility::sim_time_notify(sim_time, 0.0);
}
@@ -18,6 +18,7 @@
#include "madara/knowledge/containers/Integer.h"
#include "madara/knowledge/containers/StringVector.h"
#include "madara/knowledge/containers/CircularBuffer.h"
#include "madara/utility/SimTime.h"
#include "gams/pose/ReferenceFrame.h"
#include "gams/pose/Pose.h"
#include "gams/pose/Quaternion.h"
@@ -0,0 +1,3 @@
feature(simtime) {
macros += MADARA_FEATURE_SIMTIME
}

0 comments on commit 1f00cf7

Please sign in to comment.