diff --git a/mocap4r2_marker_viz/mocap4r2_marker_viz/include/mocap4r2_marker_viz/mocap4r2_marker_viz_node.hpp b/mocap4r2_marker_viz/mocap4r2_marker_viz/include/mocap4r2_marker_viz/mocap4r2_marker_viz_node.hpp index cee8e01..f23f097 100644 --- a/mocap4r2_marker_viz/mocap4r2_marker_viz/include/mocap4r2_marker_viz/mocap4r2_marker_viz_node.hpp +++ b/mocap4r2_marker_viz/mocap4r2_marker_viz/include/mocap4r2_marker_viz/mocap4r2_marker_viz_node.hpp @@ -52,11 +52,11 @@ class MarkerVisualizer : public rclcpp::Node void rb_callback(const mocap4r2_msgs::msg::RigidBodies::SharedPtr msg) const; visualization_msgs::msg::Marker marker2visual( - int index, const geometry_msgs::msg::Point & translation, + int index, const geometry_msgs::msg::Point & translation, const std_msgs::msg::Header & header) const; visualization_msgs::msg::Marker rb2visual( - int index, const geometry_msgs::msg::Pose & poserb, + int index, const geometry_msgs::msg::Pose & poserb, const std_msgs::msg::Header & header) const; geometry_msgs::msg::Pose mocap2rviz(const geometry_msgs::msg::Pose mocap4r2_pose) const; diff --git a/mocap4r2_marker_viz/mocap4r2_marker_viz/src/mocap4r2_marker_viz_node.cpp b/mocap4r2_marker_viz/mocap4r2_marker_viz/src/mocap4r2_marker_viz_node.cpp index 7b1c924..e2b9179 100644 --- a/mocap4r2_marker_viz/mocap4r2_marker_viz/src/mocap4r2_marker_viz_node.cpp +++ b/mocap4r2_marker_viz/mocap4r2_marker_viz/src/mocap4r2_marker_viz_node.cpp @@ -143,7 +143,7 @@ MarkerVisualizer::rb_callback(const mocap4r2_msgs::msg::RigidBodies::SharedPtr m visual_markers_rb.markers.push_back(rb2visual(counter_rb++, rb.pose, msg->header)); for (const mocap4r2_msgs::msg::Marker & marker : rb.markers) { - visual_markers_rb.markers.push_back(marker2visual(counter_markers_rb++, + visual_markers_rb.markers.push_back(marker2visual(counter_markers_rb++, marker.translation, msg->header)); } } @@ -153,7 +153,7 @@ MarkerVisualizer::rb_callback(const mocap4r2_msgs::msg::RigidBodies::SharedPtr m visualization_msgs::msg::Marker -MarkerVisualizer::rb2visual(int index, const geometry_msgs::msg::Pose & poserb, +MarkerVisualizer::rb2visual(int index, const geometry_msgs::msg::Pose & poserb, const std_msgs::msg::Header & header) const { visualization_msgs::msg::Marker viz_marker;