Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hector_slam not working with my bag file

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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

Hector_slam not working with my bag file

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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error " lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ 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, Regards,

SHantnu Kakkar

Hector_slam not working with my bag file

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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 10 (I did this becuase I was getting the error " lookupTransform "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing thisthis.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

Regards,

SHantnu Kakkar

Hector_slam not working with my bag file

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 bag 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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

Regards,

SHantnu Kakkar

Hector_slam not working with my bag file

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 slam 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 bag 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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

Regards,

SHantnu Kakkar

Hector_slam not working with my bag file

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 slam 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 bag 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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

========================================================================================= Edit: The above was my question. Now, I have been able to run hector slam properly. This is what I did to get my hector slam working:

1) Played the bag file that comes with the hector_slam package (Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag). My hector slam used to work with this file, but not with my own bag file since the bag file I was generating didn't have any tf.

2) called view_frames to view what frames does this file publish. (sorry I can't post this pdf since it always gove error that 5 points are required).

3) After seeing the frames.pdf file, I added 6 static_transform_publisher nodes in my mapping_default.launch. The following transforms were added.

node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 20"

node pkg="tf" type="static_transform_publisher" name="map_scanmatcher_broadcaster" args="0 0 0 0 0 0 map scanmatcher_frame 25"

node pkg="tf" type="static_transform_publisher" name="nav_baselink_broadcaster" args="0 0 0 0 0 0 nav base_link 13"

node pkg="tf" type="static_transform_publisher" name="nav_baseframe_broadcaster" args="0 0 0 0 0 0 nav base_frame 13"

node pkg="tf" type="static_transform_publisher" name="nav_basefootprint_broadcaster" args="0 0 0 0 0 0 nav base_footprint 13"

node pkg="tf" type="static_transform_publisher" name="baselink_laser_broadcaster" args="0 0 0 0 0 0 base_frame laser 100"

(Please note that the last transform that is base_frame to laser will be different for every person. For some people it will be base_link to laser, or it could be base_footprint to laser, depending upon your mapping_default and tutorial launch files.

4) Added following to my mapping_default inside hector_mapping node: (aplogies the start and square brackets are missing because whenever I put them, my code becomes invisible)

param name="pub_map_odom_transform" value="true"

param name="map_frame" value="map"

param name="base_frame" value="base_frame"

param name="odom_frame" value="base_frame"

5) After doing the above steps I had expected to get the map, but it was not. Apparently, the static publishing nodes that I added to me launch file were not publishing any tf. After reading various forums I found that this problem can be resolved by doing source devel/setup.bash before calling roslaunch hector_slam_launch tutorial.launch. Finally, please note that the map will be shown only when you play your bag file. Before that the error No TF data found will continue to come in RViz.

Regards,

SHantnu Shantnu Kakkar

Hector_slam not working with my bag file

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 slam 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 bag 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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

========================================================================================= Edit: The above was my question. Now, I have been able to run hector slam properly. This is what I did to get my hector slam working:

1) Played the bag file that comes with the hector_slam package (Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag). My hector slam used to work with this file, but not with my own bag file since the bag file I was generating didn't have any tf.

2) called view_frames to view what frames does this file publish. (sorry I can't post this pdf since it always gove give error that 5 points are required).

3) After seeing the frames.pdf file, I added 6 static_transform_publisher nodes in my mapping_default.launch. The following transforms were added.

node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 20"

node pkg="tf" type="static_transform_publisher" name="map_scanmatcher_broadcaster" args="0 0 0 0 0 0 map scanmatcher_frame 25"

node pkg="tf" type="static_transform_publisher" name="nav_baselink_broadcaster" args="0 0 0 0 0 0 nav base_link 13"

node pkg="tf" type="static_transform_publisher" name="nav_baseframe_broadcaster" args="0 0 0 0 0 0 nav base_frame 13"

node pkg="tf" type="static_transform_publisher" name="nav_basefootprint_broadcaster" args="0 0 0 0 0 0 nav base_footprint 13"

node pkg="tf" type="static_transform_publisher" name="baselink_laser_broadcaster" args="0 0 0 0 0 0 base_frame laser 100"

(Please note that the last transform that is base_frame to laser will be different for every person. For some people it will be base_link to laser, or it could be base_footprint to laser, depending upon your mapping_default and tutorial launch files.

4) Added following to my mapping_default inside hector_mapping node: (aplogies (apologies that the start and square brackets are missing because whenever I put them, my code becomes invisible)

param name="pub_map_odom_transform" value="true"

param name="map_frame" value="map"

param name="base_frame" value="base_frame"

param name="odom_frame" value="base_frame"

5) After doing the above steps I had expected to get the map, but it was not. Apparently, the static publishing nodes that I added to me launch file were not publishing any tf. After reading various forums I found that this problem can be resolved by doing source devel/setup.bash before calling roslaunch hector_slam_launch tutorial.launch. Finally, please note that the map will be shown only when you play your bag file. Before that the error No TF data found will continue to come in RViz.

Regards,

Shantnu Kakkar

Hector_slam not working with my bag file

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 slam 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 bag 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.

<param name="pub_map_odom_transform" value="true"/>
<param name="map_frame" value="map" />
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />

(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

1) $ rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10 (I did this becuase I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once."). Please note that the warning got removed.

2) rosrun tf static_transform_publisher 0 0 0 0 0 0 base_footprint laser 10 (I did this becuase I was getting the error "lookupTransform base_footprint to laser timed out. Could not transform laser scan into base_frame." ). Please note that the error is not getting removed after doing this.

3) $ roslaunch hector_slam_launch tutorial.launch

4) $ rosbag play 2016-05-10-05-20-45.bag --clock

Please someone help me.

========================================================================================= Edit: The above was my question. Now, I have been able to run hector slam properly. This is what I did to get my hector slam working:

1) Played the bag file that comes with the hector_slam package (Team_Hector_MappingBox_RoboCup_2011_Rescue_Arena.bag). My hector slam used to work with this file, but not with my own bag file since the bag file I was generating didn't have any tf.

2) called view_frames to view what frames does this file publish. (sorry I can't post this pdf since it always give error that 5 points are required).

3) After seeing the Based on the generated frames.pdf file, I added 6 static_transform_publisher nodes in my mapping_default.launch. The following transforms were added.

node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="0 0 0 0 0 0 map nav 20"

node pkg="tf" type="static_transform_publisher" name="map_scanmatcher_broadcaster" args="0 0 0 0 0 0 map scanmatcher_frame 25"

node pkg="tf" type="static_transform_publisher" name="nav_baselink_broadcaster" args="0 0 0 0 0 0 nav base_link 13"

node pkg="tf" type="static_transform_publisher" name="nav_baseframe_broadcaster" args="0 0 0 0 0 0 nav base_frame 13"

node pkg="tf" type="static_transform_publisher" name="nav_basefootprint_broadcaster" args="0 0 0 0 0 0 nav base_footprint 13"

node pkg="tf" type="static_transform_publisher" name="baselink_laser_broadcaster" args="0 0 0 0 0 0 base_frame laser 100"

(Please note that the last transform that is base_frame to laser will be different for every person. For some people it will be base_link to laser, or it could be base_footprint to laser, depending upon your mapping_default and tutorial launch files.

4) Added following to my mapping_default inside hector_mapping node: (apologies that the start and square brackets are missing because whenever I put them, my code becomes invisible)

param name="pub_map_odom_transform" value="true"

param name="map_frame" value="map"

param name="base_frame" value="base_frame"

param name="odom_frame" value="base_frame"

5) After doing the above steps I had expected to get the map, but it was not. Apparently, the static publishing nodes that I added to me launch file were not publishing any tf. After reading various forums I found that this problem can be resolved by doing source devel/setup.bash before calling roslaunch hector_slam_launch tutorial.launch. Finally, please note that the map will be shown only when you play your bag file. Before that the error No TF data found will continue to come in RViz.

Regards,

Shantnu Kakkar