0
$\begingroup$

Rosanswers logo

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:

<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" />
</node>

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

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

<!-- 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>

<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" />
</launch>

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?


Originally posted by artur on ROS Answers with karma: 16 on 2018-06-07

Post score: 0


Original comments

Comment by pengjiawei on 2018-06-07:
what can you see if you do rostopic echo /base_scan and rostopic echo /map

Comment by artur on 2018-06-08:
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.

Comment by artur on 2018-06-11:
We found out, that there are problems with the /Mapper Node and the LaserScan Data of the rplidar Node: rosnode info /Mapper

Subscriptions: 
 * /base_scan [unknown type]
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped]
 * /karto_in [unknown type]
...

Comment by artur on 2018-06-18:
Tried it with gazebo turtlebot_world simulator instead of sage and there are the same problems. :-(

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

https://answers.ros.org/question/229676/map-not-received-when-using-nav2d-with-gazebo/?answer=269164#post-id-269164

This was the solution for our problem.


Originally posted by artur with karma: 16 on 2018-06-21

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.