Ask Your Question

I have created my map using hector slam, now I want my robot to navigate autonomously. How do I acheive this? [closed]

asked 2020-08-11 02:12:23 -0500

Haadi gravatar image

I have created a robot that has wheels connected to an arduino, these wheels will move by giving a pwm using arduino. My arduino is connected to raspberry pi. I have connected an RPLIDAR to my raspberry pi which publishes nodes on ROS and I am able to create a map on my laptop using hector slam. The next thing i want to do is to have my robot move autonomously to any location I want on the map.

How can I acheive this? There are tutorials but those only show the simulated version. How can i acheive this with my robot.

P.S. I know its a broad question, but any guidance to point me in the right is appreciated. Thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Haadi
close date 2020-09-18 04:33:24.415753

1 Answer

Sort by ยป oldest newest most voted

answered 2020-08-11 06:05:45 -0500

bfdmetu gravatar image

First of all you need odometry information. Becase navigation stack needs /odom info. Odometry is generally calculated from encoder wheels.right wheels and left wheels give you velocity of your robot and theta of your robot angle in space.

I think firstly you should get encoders and learn how to calculate odometry. And of course how to publish odometry inforamtion

edit flag offensive delete link more


Thanks for the reply. I had researched a bit and understand that I need encoders to publish encoder ticks and velocity values for navigation stack. But i donot understand how can i connect them? (Through arduino or directly to my raspberry pi?) . Furthermore, how to send this information over to ROS?

Are there any tutorials for that?

Haadi gravatar image Haadi  ( 2020-08-12 02:11:44 -0500 )edit

Hi.sorry being late answer. You have to use with arduino. Firstly connect to arduino with pins. Then calculate right and left wheel speed in arduino code. After that, you will connect ros with ros-serial package. It will give you connection raspberry pi and arduino. Ros serial and Arduino package. There is similar projects. is good example.

bfdmetu gravatar image bfdmetu  ( 2020-08-20 03:43:29 -0500 )edit

Question Tools

1 follower


Asked: 2020-08-11 02:12:23 -0500

Seen: 97 times

Last updated: Aug 11 '20