Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the pose_V to TFMessage conform with ROS2 #510

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ros_gz_bridge/src/convert/tf2_msgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ convert_gz_to_ros(
tf2_msgs::msg::TFMessage & ros_msg)
{
ros_msg.transforms.clear();
builtin_interfaces::msg::Time ros_stamp;
convert_gz_to_ros(gz_msg.header().stamp(), ros_stamp);

for (auto const & p : gz_msg.pose()) {
geometry_msgs::msg::TransformStamped tf;
convert_gz_to_ros(p, tf);
tf.header.stamp = ros_stamp;
tf.header.frame_id = "world";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this, maybe we should be able to configure this with a parameter, @azeey or @mjcarroll thoughts?

tf.child_frame_id = p.name();
ros_msg.transforms.push_back(tf);
}
}
Expand Down
Loading