How to merge laser TF with other TF frames?
I am new to ROS and I am sure my question reflects this.. Thanks in advance for your time.
I am using Ubuntu 14.04 on a Lenovo W530 laptop. I am running ROS indigo that I installed with apt-get
.
I have a physical robot I am trying to ROSify. I was lucky to be instructed on how to begin this process ( https://answers.ros.org/question/2718... both robot and how to rosify can be seen there). I was told to first create a URDF file, which I did (see here: https://pastebin.com/Hzy5jpwP ). After this objective I focused on the next task as per the post, and created a robot state publisher. This code is a really ugly and I apologize in advance, I will clean it up soon. You can see it here: https://pastebin.com/NQVzuUD0 . Right now as I manually rotate my LMS, RViz shows it move in real time.... it's so cool!
The problem that I have is that I am not able to visualize all my frames in a single RViz session at the same time. I can open RViz and create a TF and RobotModel types and there are no errors and everything looks good. However as soon as I add a LaserScan type I get a TF error Transform[sender=unknown_publisher] for frame [laser]: Frame [laser] does not exist
:
:
To get the Sick LMS to publish it's data I followed this tutorial for sicktoolbox_wrapper: http://wiki.ros.org/sicktoolbox_wrapp... . However I could not see any scans, to see my LMS laser scans I followed the second answer in this post ( https://answers.ros.org/question/7928... ). When I follow the answer I am able to see the laser but the TF and RobotModel in RViz fault out with this message: Fixed Frame [laser] does not exist
.
.
Can you please explain how to amalgamate all the frames so that I can see the TF, RobotModel and LaserScan data types all at the same time without any errors? What code do I need to add to my cpp file or URDF file? If you could please explain with a small code snippet I would really appreciate it.
If I can add any information please let me know.
Thanks in advance.
**********EDIT #1****************
Clarification on implementing the first part of your answer:
In the URDF code snippet you provided, you are suggesting I create a joint between the LaserScanner device that is publishing to the /scan topic and another frame in the URDF file. I can't figure out how to refer to the LaserSensor within the URDF file. Initially I had no sensor
tag, so I tried to add a sensor
tag ( http://wiki.ros.org/urdf/XML/sensor ) and use it alone, but the error remained the same (as in the first screen shot in this question). Next I tried to create a joint between it and another frame but I started getting errors: [ERROR] [1510628866.601958478]: Failed to ...
I don't think
<sensor>
does anything, but<link name="sicklms" />
should make the urdf work.