Ask Your Question
0

Creating your own robot to use with Path finding / Mapping

asked 2016-12-30 10:07:21 -0600

burf2000 gravatar image

So sorry if I am asking some silly questions but ROS is such a huge thing which is super fun. I been looking over some of the tutorials, turtlebot etc as one of the simulations does exactly what I want to do with my robot (navigate round a maze). I just want to make sure I have the right steps that I need to learn.

For me to use a real robot in a maze (say my house), I would just like to make sure I know the correct steps

  1. Model the robot for RVIZ (is this the same format for Gazebo)
  2. Write a subscriber driver for the robot (motors, cmd_vel)
  3. Find publishers for any sensors I want to use (currently neato lidar)
  4. Create a Map of the area to load in to RVIZ
  5. Use amcl for path finding
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-12-30 14:13:43 -0600

billy gravatar image

updated 2016-12-31 14:14:55 -0600

You're close, but let me clear up a few things. You're right that ROS is a huge thing, so you should prepare yourself regarding how much troubleshooting you'll have to do to make everything work.

RVIZ is simply a visualization tool. Technically you don't need it all to run the Navigation stack which will do what you're talking about. The nodes that do the mapping, pathfinding, obstacle avoidance, and closed loop control are in the Navigation stack, but they publish data that RVIZ can use to show what is happening.

You don't mention any sensors that will generate odometry data. While there is a node that can generate odom data from laser scans, I think you'll find that the neato lidar is too slow to get acceptable results without sensor based odom data. I use encoders on the wheel-drive motors, and I think that is pretty standard, but you could also use an IMU to get the data.

http://wiki.ros.org/navigation/Tutorials

Follow the navigation stack tutorial line by line, and follow every link in the tutorial where additional detail is provided. These links include things like setting to odom publisher, creating a map, etc. It's a good way to start.

Update after follow on question:

You will need to model your robot in a sense, but then again no.

1 - For the path planning, the node needs to know the shape of the robot, so there is a line to enter the robot shape in one of the YAML files I think. Don't remember which file but it is discussed in the tutorials so you'll be told about it before you need it,

2 - ROS units are in meters and quaternions. If you have a robot that takes commands and issues odometry directly in meters and quaternions then you do not need to model the drive of the robot. Otherwise you will need to provide nodes that do the conversions from meters/sec and quaternions to what ever units your robot works with. In my case, I get motor position data in encoder counts and have a node that converts to position, velocity and angle that gets published on odom topic. I have another node that subscribes to the cmd_vel topic that converts that data to encoder counts/sec for each motor and sends it to robot. So in a sense, I had to model the drive of the robot.

3 - Once the robot is navigating, you'll find that you need to tune some parameters to optimize performance. Again this not modeling the robot, but requires setup based on your robot.

4 - You will need to set up a transform that links your robot center to the location of the the laser scanner. I guess this is kind of modeling.

edit flag offensive delete link more

Comments

Can't emphasise it enough: RViz is just a visualisation tool, nothing more.

A very nice one, with great integration with ROS, but visualisation only.

gvdhoorn gravatar imagegvdhoorn ( 2016-12-31 05:58:22 -0600 )edit

Thank you for the advice, i have already started going through the tutorials, and I understand that RVIZ is just a visual tool for seeing what happens. My only question to check is, do I need to model the robot? It's going to be a simple differential drive robot

burf2000 gravatar imageburf2000 ( 2016-12-31 11:45:34 -0600 )edit

updated my answer above to address the modeling question

billy gravatar imagebilly ( 2016-12-31 14:04:25 -0600 )edit

Hi Billy have you done your own custom robots?

burf2000 gravatar imageburf2000 ( 2017-01-17 14:34:07 -0600 )edit

Yes. What's the fun in buying a robot someone else designed?

billy gravatar imagebilly ( 2017-01-17 20:47:46 -0600 )edit

If you ever offer email support lol let me know, I feel I am getting so close and the project is for a good cause (VEX WORLDS in the US). I think once I have a odem sample and understand the navigation stack I be there.

burf2000 gravatar imageburf2000 ( 2017-01-18 08:06:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-12-30 10:07:21 -0600

Seen: 989 times

Last updated: Dec 31 '16