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

[ros2] gazebo_ros_joint_state_publisher #795

Merged
merged 6 commits into from
Aug 9, 2018
Merged

Conversation

chapulina
Copy link
Contributor

Try out the demo, make sure you either have the double_pendulum_with_base model locally or an internet connection:

gazebo --verbose install/gazebo_plugins/share/gazebo_plugins/worlds/gazebo_ros_joint_state_publisher_demo.world

joint_state_pub


Migration

SDF

ROS ROS 2
<robotNamespace> <ros><namespace>
<jointName>joint1, joint2</jointName> <joint_name>joint1</joint_name><joint_name>joint2</joint_name>
<updateRate> <update_rate>

Copy link
Collaborator

@kev-the-dev kev-the-dev left a comment

Choose a reason for hiding this comment

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

One typo, otherwise LGTM


void GazeboRosJointStatePublisher::Load(gazebo::physics::ModelPtr model, sdf::ElementPtr sdf)
{
auto logger = rclcpp::get_logger("gazebo_ros_force");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be "gazebo_ros_joint_state_publisher", though I personally favor creating the Node in the beginning and using it's logger node->get_logger(). This will avoid any inconsistency in logging if the node name is remapped

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually started that way, but then I moved the node creation to the bottom so we don't need to destroy the node in case the load function returns early.

But I can move it back to the top if you have a strong preference, I agree that it would make the logging consistent.

@chapulina chapulina merged commit 70c2587 into ros2 Aug 9, 2018
@chapulina chapulina deleted the ros2_joint_state_pub branch August 10, 2018 18:32
@dhood dhood added the ros2 label Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants