Merging Laser Readings into one Topic

4 views (last 30 days)
Samuel A. Prieto
Samuel A. Prieto on 22 May 2015
Edited: Tohru Kikawada on 2 May 2019
Hi all,
I've a robot with two Hokuyo lasers, but most of ROS algorithms only allow one laser reading as an input. For that reason, I'm trying to import the readings of the two lasers to MatLab and merge them, publishing later the coordinates of all the points (corresponding to the two readings) in one topic.
I've accomplished the merging of the readings, the problem is in the publication of the topic. I've created another link/tf in my ROS setup, in which I pretend to attach the data of this new topic. The link is properly connected in the tf tree and all the transformations are available, the message has the new link as the Header and everything is working fine when I do a "rostopic echo" of this new topic. However, when I'm trying to visualize this new laser readings in Rviz, none of the data is shown and I get the error "Unknown reason for transform failure".
I've reading about this error and seems to be a problem related with the frame_id of the node that is publishing the topic, because if I set the Fixed Frame of Rviz to the specific link that I've created for the merging data ("hokuyo_laser_link3", in this case) I can see JUST one scan of the new data.
The question is, does anyone know how to specify the frame_id of the node that is created when you do the "rosinit"? Or do you know another possible solution for my problem?
If more information were needed, like screenshots or the tf_tree, just ask.
Thanks

Answers (1)

Tohru Kikawada
Tohru Kikawada on 2 May 2019
Edited: Tohru Kikawada on 2 May 2019
The frame_id shoud be published as described in the following documentation. https://mathworks.com/help/robotics/examples/access-the-tf-transformation-tree-in-ros.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!