Ask Your Question
0

Problem in implementing SLAM in ROS

asked 2017-05-20 22:38:53 -0500

Dhagash Desai gravatar image

I know the algorithms of the SLAM but I want to implement my own code without using gmapping I know how SLAM is implemented but don't know how to integrate it with ROS. Is their any guide I also know how to publish nodes in Ros but what I have to do to create a map from laser data without using gmapping or any ROS commands. Can anyone help?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-05-21 08:41:18 -0500

alsora gravatar image

As far as I know, there are no guides. I suggest you to have a look at gmapping, amcl and mapserver nodes.

In practice you have to implement the following things (presuming that you are going to work with most recent graph-slam theories)

  • a node that listen to odom and scan topics. When the distance traveled overcomes a certain threshold you add a node to your topological map. A laser scan has to be attached to each node. Then, each time you add a new node you can perform least squares adjustment, loop closure and similar stuffs.

  • a node that given the graph (and so the last optimized node) correct the robot position. Your tf tree has to be something like this: map -> odom -> base_link . The robot moves with respect to the odom frame, so to correct drift you have to publish a map to odom transform.

  • a node that given the graph, creates the map as an occupancy grid. This can be done again using the graph: given the scan associated to nodes, you can elaborate the map. For example, considering a single scan, assume that the first laser ray reaches distance D, so you know that the cells from the robot pose until D, along the ray direction, will be free; the cell at D will be an obstacle; the cells behind D will remain unknown. Obviously you have to integrate together the information coming from all the scans, because maybe a successive scan could see the same obstacle at distance D+1 and so on.... So you have to assign to each cell a probability of being occupied or not, depending on how many rays go beyond it and on how many stops at it.

I hope that this can clarify your ideas.

edit flag offensive delete link more

Comments

Thanks this will surely help can u give your email id if I get stuck some where I can mail you. Thanks in advance

Dhagash Desai gravatar imageDhagash Desai ( 2017-05-21 22:13:58 -0500 )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: 2017-05-20 22:38:53 -0500

Seen: 128 times

Last updated: May 21 '17