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

How to do GMapping and SLAM Navigation using RPLIDAR A2 and Kobuki?

asked 2017-06-02 14:33:33 -0500

RedstoneTaken gravatar image

updated 2017-08-12 08:08:55 -0500

I have a Kobuki and installed Turtlebot software on my Turtlebot laptop and set everything up for Turtlebot, and I just got an RPLIDAR A2 yesterday and I couldn't figure out how to get it to work with Turtlebot Gmapping and AMCL, to navigate autonomously. On the remote computer the scan doesn't show up but the Kobuki's odometry shows up. I dont think there were any errors. In the launch file I deleted the line of code that starts the 3d camera, and I start the RPLIDAR node from another command line. But again, nothing! So please help me if you can. I am running Ubuntu 16.04 and ROS Kinetic on the Turtlebot Laptop and Ubuntu 14.04 ROS Indigo on the remote computer. Thanks!

Edit: I am now using hector_slam to do this. I have a pretty noisy map but I guess it could work, but now the question is how does the Turtlebot use the RPLIDAR A2 to navigate in the map generated by hector_slam? What parameters should I use in RVIZ? Is there a hector navigation file?

Edit 2: I could still use Gmapping, and obviously that would be SO much easier since I know how to do gmapping, but how do I implement it with an RPLIDAR A2? I will edit this again when I can get the error codes. Also, the errors happen when I run the rplidar node and then the turtlebot minimal node and then the gmapping node and I think it's because of a transform that I didn't put in the launch file.

edit retag flag offensive close merge delete

Comments

1

Can you edit your question to include relevant code, as well as ROS version and OS info? When you say it "doesn't show up", what does this mean? Does the node not launch, or is there no messages being published?

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-05 18:23:24 -0500 )edit

have you figured this out?

aarontan gravatar image aarontan  ( 2018-06-18 19:43:39 -0500 )edit

Did y'all try the hokuyo tutorials, I think adding any lidar is similar process. I had luck doing an analogous ydlidar addition to my turtlebot.

lukewd gravatar image lukewd  ( 2019-03-25 22:01:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-25 21:59:40 -0500

lukewd gravatar image

updated 2019-03-25 23:26:02 -0500

jayess gravatar image

I was able to update my Turtlebot 2 (with Create 2 Base) to a 360 degree YDLidar to use for navigation.

I made a copy of the minimal.launch file in turtlebot launch folder, and renamed it. I added this to it:

<node name="ydlidar_node"  pkg="ydlidar"  type="ydlidar_node" output="screen">
<param name="port"         type="string" value="/dev/ydlidar"/>
<param name="baudrate"     type="int"    value="115200"/>
<param name="frame_id"     type="string" value="laser_frame"/>
<param name="angle_fixed"  type="bool"   value="true"/>
<param name="low_exposure"  type="bool"   value="false"/>
<param name="heartbeat"    type="bool"   value="false"/>
<param name="resolution_fixed"    type="bool"   value="true"/>
<param name="angle_min"    type="double" value="-180" />
<param name="angle_max"    type="double" value="180" />
<param name="range_min"    type="double" value="0.08" />
<param name="range_max"    type="double" value="16.0" />
<param name="ignore_array" type="string" value="" />
<param name="samp_rate"    type="int"    value="9"/>
<param name="frequency"    type="double" value="7"/>
</node>  

<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser4"
args="0.0 0.0 0.2 0.0 0.0 0.0 /base_footprint /laser_frame 40" />

I also added the ros-compatible ydlidar library to the src folder.

After a few tries I got it to work and could then map a room very quickly with 360 degree view instead of the limited range of the kinect.

If I recall, I used links like these to help me:

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-02 14:33:33 -0500

Seen: 2,260 times

Last updated: Mar 25 '19