0
$\begingroup$

Rosanswers logo

I have a node that I want to subscribe two topics from nav2d, I'm interested to use the /base_scan and /odom topics. When I look in launch files then I can see <!-- Start the Operator to control the simulated robot --> <node name="Operator" pkg="nav2d_operator" type="operator" > <remap from="scan" to="base_scan"/> <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/> <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" /> </node>

I know that "scan" in stage that is remapped to the "base_scan" topic. But what is the remap name for /odom or /base_pose_ground_truth topic ? Or where can I find it ?

Can I for example name /odom topic as <remap from="odometry" to="odom"/> ?


Originally posted by RosUser on ROS Answers with karma: 81 on 2016-04-06

Post score: 0


Original comments

Comment by F.Brosseau on 2016-04-06:
If you make : rosnode info Operator ; you will see topics coming in and out of this node. Then you just have to take the name of the odometry topic and change it with odom with a remap.

Comment by RosUser on 2016-04-06:
I tried rosnode info Stage and can see both base_scan and odom publications! sow can I write like this in launch file: ?

Comment by F.Brosseau on 2016-04-06:
Yes it should work

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This will work for the scans. but not for the odometry. The Operater receives odometry information via the "tf" topic. (Which is also provided by Stage) So you just have to make sure that the frame names for "robot_frame" and "odometry_frame" are set correctly.


Originally posted by Sebastian Kasperski with karma: 1658 on 2016-04-06

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by RosUser on 2016-04-06:
In Operator it is set ("robot_frame", mRobotFrame, std::string("robot") and ("odometry_frame", mOdometryFrame, std::string("odometry_base). So should it be <remap from="odometry_base" to="odom"/> ?

Comment by Sebastian Kasperski on 2016-04-07:
These are node parameters, please set them in operator.yaml.

Comment by RosUser on 2016-04-07:
I have set in operator.yaml file odometry_frame: odom and robot_frame: base_link.I'm not sure robot_frame should be set to the topic base_link because I can't find this topic when I run rostopic list

Comment by Sebastian Kasperski on 2016-04-07:
These are not topics, but frame names published via topic "tf". Use "rosrun tf view_frames" to view all published frames in your system. I also strongly recommend the tutorials at tf package.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.