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

How to change the frame(fixed/target) of hokuyo node?

asked 2011-07-19 23:41:30 -0500

sam gravatar image

I use the launch file

 <launch>
    <node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node">
        <remap from="/laser" to="/base_laser" />
    </node>
 </launch>

I run the command :

 rosrun rviz rviz -d `rospack find hokuyo_node`/hokuyo_test.vcg

It shows the frame /laser not /base_laser.

image description

  1. How to change it when run the launch file? Because in other nodes use the other name.

  2. What difference between fixed and target frame?

Thank you~

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2011-07-20 00:27:06 -0500

updated 2011-07-20 00:41:21 -0500

Hi,
I am not sure you can change a parameter using remap, you could change the name of a topic for example, in hokuyo_node you can change the topic "scan". Click here for more information
This topic publishes LaserScan messages, which contain an element called "frame_id" which is also a parameter of the node and it is set to "laser" by default.

1. To change this you can use the dynamic reconfigure

rosrun dynamic_reconfigure reconfigure_gui

or set the parameter in the launch file adding the line

<param name="frame_id" value="/base_laser"/>

2. Check the rviz Coordinate Frames out

I hope this will help you!

(edit) After seen mbj's reply
Also you can change the Fixed frame, clicking and editing the text.

edit flag offensive delete link more

Comments

Why I use reconfigure_gui to change /laser to /base_laser, it doesn't work when I opne rviz : rosrun rviz rviz -d `rospack find hokuyo_node`/hokuyo_test.vcg ?
sam gravatar image sam  ( 2011-07-20 00:57:20 -0500 )edit
because you have to change it in both places, reconfigure_gui changes the frame_id in the LaserScan messages published and also change the fixed_frame in rviz (or in the .vcg file, which is the rviz configuration) which tells the program which frame_id is the "base" or the "world"
martimorta gravatar image martimorta  ( 2011-07-20 02:20:17 -0500 )edit
1

answered 2011-07-20 00:09:38 -0500

mbj gravatar image

updated 2011-07-20 00:10:21 -0500

You can edit the hokuyo_test.vcg and rename Fixed Frame=/laser to Fixed Frame=/base_laser.

Answering to your question between fixed and target frame differences, you can take a look of this wiki page.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-07-19 23:41:30 -0500

Seen: 5,053 times

Last updated: Jul 20 '11