ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

Hi,

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" />
  </node>

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

NODES
  /right/

However I am getting this topic names:

/get_state
/set_state

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
0

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

Question Tools

1 follower

Stats

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

Seen: 131 times

Last updated: Jun 19 '19