ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Static topic name ignores the group_ns

asked 2019-06-19 07:56:35 -0500

EdwardNur gravatar image

updated 2019-06-19 07:57:06 -0500


I have declared the topics in my class like this:

_m_state_publisher = motor_nh.advertise<maxon_epos_msgs::MotorState>(_motor_name + "/get_state", 100);
_m_state_subscriber = motor_nh.subscribe("/set_state", 100, &EposMotor::writeCallback, this)

And I have launched like this:

 <group ns="right">
  <node pkg="maxon_epos_driver" type="maxon_bringup" name="maxon_bringup" output="screen">
    <rosparam file="$(find maxon_epos_ros)/config/example.yaml" command="load" />

And during the launch, motor_name and group_ns worked:

/right/maxon_tr/motor_name: ['bottom_left_mot...
 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /use_sim_time: False


However I am getting this topic names:


Why is this? maxon_tr (maxon_epos_driver/maxon_bringup) </group>

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-19 08:58:40 -0500

gvdhoorn gravatar image

Why is this?

because you've made /get_state and /set_state global names, which are "considered fully resolved" (ie: cannot be remapped any more).

Refer to wiki/Names - Resolving.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-06-19 07:56:35 -0500

Seen: 84 times

Last updated: Jun 19 '19