Fixed timestamp conversion. Srv: changed "global" member to "global_map" (python reserved word). CoreWrapper: fixed imu subscription.

This commit is contained in:
matlabbe
2021-10-05 13:53:13 -04:00
parent 801fcade72
commit fb1200c8f1
11 changed files with 24 additions and 22 deletions
+2 -2
View File
@@ -185,8 +185,8 @@ rtabmap::Landmarks landmarksFromROS(
double defaultLinVariance,
double defaultAngVariance);
inline double timestampFromROS(const rclcpp::Time & stamp) {return double(stamp.seconds()) + double(stamp.nanoseconds())/1000000000.0;}
inline rclcpp::Time timestampToROS(const double & t) {uint32_t sec= (uint32_t)floor(t); return rclcpp::Time(sec, (uint32_t)std::round((t-sec) * 1e9));}
inline double timestampFromROS(const rclcpp::Time & stamp) {return stamp.seconds();}
inline rclcpp::Time timestampToROS(const double & t) {int32_t sec= (int32_t)floor(t); return rclcpp::Time(sec, (uint32_t)std::round((t-sec) * 1e9));}
// common stuff
rtabmap::Transform getTransform(