I am trying to do hector slam using lidar SICK LMS291-s05 , but I am unable to get map with the bag file generated by me. I can get the map with the bag file that comes with the hector slma library. Please note that I don't have any odometry data, but only LIDAR scan data. This is the procedure that I followed:
A) **Generating the bag file containing laser scan data using tutorial http://wiki.ros.org/sicktoolbox_wrapper/Tutorials/UsingTheSicklms**:
$ sudo chmod a+rw /dev/ttyUSB0
$ ls -l /dev/ttyUSB0
$roscore
$rosrun sicktoolbox_wrapper sicklms _port:=/dev/ttyUSB0 _baud:=38400
$ rosbag record scan
*(The launch file gets generated by the name 2016-05-10-05-20-45.bag)*
B) **Setting parameters for hector slam as explained in the tutorial http://wiki.ros.org/hector_slam/Tutorials/SettingUpForYourRobot**
To do this, I copy pasted the following from the tutorial into the /home/akashan/catkin_ws/src/hector_slam/hector_mapping/launch/mapping_default.launch file.
*(I am not sure whether I did the part B correctly. Please someone verify this whether I have copy pasted in the right launch file or not)*
**C) Running Hector SLAM in RVIZ as explained in the tutorial hector SLAM tutorial http://wiki.ros.org/hector_slam/Tutorials/MappingUsingLoggedData**
$ roslaunch hector_slam_launch tutorial.launch
$ rosbag play 2016-05-10-05-20-45.bag --clock
**The following error comes: No tf data. Actual error: Fixed Frame [map] does not exist.**
To solve this error, I tried doing rosrun *tf static_transform_publisher 0.0 0.0 0.0 0 0 0 1 map my_frame 100*. This removed my error. However, I am still unable to get the map.
Please someone help me.
Regards,
SHantnu Kakkar
↧