-
Notifications
You must be signed in to change notification settings - Fork 773
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
Conversation
There was a problem hiding this 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"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
1b6f9bc
to
4fe1967
Compare
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
Migration
SDF
<robotNamespace>
<ros><namespace>
<jointName>joint1, joint2</jointName>
<joint_name>joint1</joint_name><joint_name>joint2</joint_name>
<updateRate>
<update_rate>