ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

nav2d exploration with turtlebot and lidar: no map available

asked 2018-06-07 09:57:10 -0500

artur gravatar image

updated 2018-06-11 03:08:39 -0500

Hey guys, we have a project at our university for a autonomous SLAM Turtlebot2 with a Lidar A2 Laserscanner by slamtec. We tried the nav2d_tutorials and the tutorial3 is our perfect setup. its working perfectly in the simulator, but for the next step we need to combine all the nodes of the tutorial3 with the rplidar and turtlebot node.

This is the edited tutorial3.launch:

<!--1.  Kommando zum Starten der ersten Map rosservice call /StartMapping -->
<!--2.  Kommando zum Starten des rumfahrens rosservice call /StartExploration -->

<!-- Some general parameters -->
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <remap from="/cmd_vel" to="/mobile_base/commands/velocity" />
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
    <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />

<!-- Start Mapper to genreate map from laser scans -->
<node name="Mapper" pkg="nav2d_karto" type="mapper">

    <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>

<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
    <rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/>

<node name="Explore" pkg="nav2d_navigator" type="explore_client" />
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />

<!-- Start the joystick-driver and remote-controller for operation-->
<node name="Joystick" pkg="joy" type="joy_node" />
<node name="Remote" pkg="nav2d_remote" type="remote_joy" />

<!-- RVIZ to view the visualization -->
<node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" />

The simulator node is removed and instead, we launch the turtlebot_bringup minimal.launch. For the Lidar Scanner results we are starting the rplidar node of robopeak. The /scan topic is also providing LaserScan Messages. These two nodes are started on a raspberry pi on the turtlebot. The rest is started on a workstation (roscore also on the pi and the workstations ROS_MASTER_URI points to the pi).

So the problem is, somehow the karo mapper cant create a map and therefore the robot cant start exploring. With the StartMapping Call the turtlebot makes his initial position finding, but the map is not created and therefore the exploration wont work. Rviz says no map provided.

The params files are still the same of the tutorial3. This is the rosgraph of our setting:

image description

We also tried to remap the /scan topic to /base_scan, but it wasnt working.

Can anybody help us with this problem?

edit retag flag offensive close merge delete


what can you see if you do rostopic echo /base_scan and rostopic echo /map

pengjiawei gravatar image pengjiawei  ( 2018-06-07 20:52:10 -0500 )edit

If we remap the /scan topic of the rplidar node zu /base_scan, the LaserScan Results are coming via base_scan, otherwise via /scan.

But the /map is still empty with, and without the remap.

artur gravatar image artur  ( 2018-06-08 03:16:28 -0500 )edit

We found out, that there are problems with the /Mapper Node and the LaserScan Data of the rplidar Node: rosnode info /Mapper

 * /base_scan [unknown type]
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped]
 * /karto_in [unknown type]
artur gravatar image artur  ( 2018-06-11 06:44:52 -0500 )edit

Tried it with gazebo turtlebot_world simulator instead of sage and there are the same problems. :-(

artur gravatar image artur  ( 2018-06-18 07:27:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-21 05:20:12 -0500

artur gravatar image

This was the solution for our problem.

edit flag offensive delete link more

Question Tools


Asked: 2018-06-07 09:57:10 -0500

Seen: 513 times

Last updated: Jun 21 '18