Ask Your Question

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

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

sam gravatar image

I use the launch file

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

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

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

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

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


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 imagesam ( 2011-07-20 00:57:20 -0600 )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 imagemartimorta ( 2011-07-20 02:20:17 -0600 )edit

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

mbj gravatar image

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

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

Your Answer

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

Add Answer

Question Tools


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

Seen: 4,334 times

Last updated: Jul 20 '11