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

Steps-How to Start with Navigation Stack

asked 2017-10-27 07:18:49 -0500

marawy_alsakaf gravatar image

updated 2017-10-27 13:38:44 -0500

Hello

I have a robot that is supposed to navigate autonomously, i decided to use the navigation stack in ROS. but i feel lost ! i do not know how to start with it. i already read its tutorials but i can not understand how to apply it to my robot.


specifically the tutorial is not clear for me in the following points


from the beginning how to write the tf for my robot is it only about base_link to base_laser ? and if my URDF is written, how to use it for tf ? ,, next thing i wrote the laser node, the IMU node, the GPS .. separately i did not get how to use them with navigation stack


so i need clear steps to start with navigation stack please.

edit retag flag offensive close merge delete

Comments

What specifically about the tutorials is not clear? Also, it takes a few readings for the tutorials to start to sink in (at least that's how it was for me).

jayess gravatar image jayess  ( 2017-10-27 10:16:45 -0500 )edit

@jayess from the beginning how to write the tf for my robot is it only about base_link to base_laser ? my URDF is written, how to use it for tf ? ,, next thing i wrote the laser node, the IMU node, the GPS .. separately i did not get how to use them with navigation stack

marawy_alsakaf gravatar image marawy_alsakaf  ( 2017-10-27 10:28:09 -0500 )edit

I highly recommend these tutorials on youtube: https://www.youtube.com/watch?v=8ckSl...

psammut gravatar image psammut  ( 2017-10-28 12:50:39 -0500 )edit

@psammut is it the same steps for real robot or for Gazebo

marawy_alsakaf gravatar image marawy_alsakaf  ( 2017-10-29 04:28:55 -0500 )edit

I recommend the following video tutorials: 1. creation of robot URDF. 2. TF understanding

For understanding the use of sensors with navigation stack, check the courses at http://www.robotigniteacademy.com

R. Tellez gravatar image R. Tellez  ( 2017-10-30 00:58:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2017-10-27 18:07:07 -0500

To get the urdf specification to be published in the tf tree. Your robot needs to output a sensor_msgs::JointState message which gives the description of all the states in your robot's joints.The names used in the jointstate should correspond to the names used for your joints in the urdf model. Include in your roslaunch a state_publisher node from the robot_state_publisher package. It will subscribe to your jointstate message, read the robot description off the parameter server and publish the tf tree correctly.

<!-- Convert an xacro and put on parameter server -->
<param name="robot_description" command="$(find xacro)/xacro.py '$(find asp_platform)/urdf/asp.xacro'" />

<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

In general your robot needs to respond to a geometry_msgs::twist message published on the output of the navigation stack as the /cmd_vel topic. That is it should be able to be remotely controlled with linear.x as forward and backward and angular.z as rotation for a 2D non-holonomic robot. The robot should also output some sort of estimation of its position, typically via a nav_messages::odometry message which can be used by localisation routines such as amcl combined with some sensor data ie from your laser, to get a good estimate of position.

Once your robot can respond to cmd_vel twist messages, output its pose at least as a odometry message and you have the appropriate localisation routines to get a good estimate of pose and the full tf tree is available via the robot_state_publisher or other methods (you can output the tfs directly if you like) then you should have every thing you need to start using the planners available in the navigation stack.

have fun.

edit flag offensive delete link more

Comments

ok, "Your robot needs to output a sensor_msgs::JointState message" from where i am supposed to get Jointstate message is it from the URDF ? or from encoders and IMU ?

marawy_alsakaf gravatar image marawy_alsakaf  ( 2017-11-04 14:32:53 -0500 )edit

No your robot needs to generate this. This usually (But not always) means writing a driver to communicate with the hardware of your robot, and then publish this on a ros topic. Or if you are running a simulation you need to publish this message with data from your simulation.

PeterMilani gravatar image PeterMilani  ( 2017-11-08 04:50:29 -0500 )edit
-1

answered 2019-02-13 08:33:14 -0500

Mohamed gravatar image

Hi,

Here is a complete tutorial on using the ros navigation stack.

https://www.youtube.com/playlist?list...

I thought of sharing it here as it might be useful.

edit flag offensive delete link more

Comments

This is not an answer, but rather a comment as it does not provide an answer but is only a link. And, honestly, it comes of rather spammy because it's a link to your YouTube channel and you did the same thing to two other questions at the same time (#q65453& #q296575).

jayess gravatar image jayess  ( 2019-02-13 18:09:15 -0500 )edit

The tutorials are not shared randomly (spammy) as you mentioned. They are shared where they are only relevant. Spammy means that they were shared randomly everywhere which is not the case. And there is nothing wrong with sharing the relevant answer which happens to be a tutorial on my channel.

Mohamed gravatar image Mohamed  ( 2019-02-13 20:55:34 -0500 )edit

Sorry, if this came off as harsh or insulting to you because it wasn't meant to be. What I meant was that it's more of an advertisement to your YouTube channel than an answer. Link-only answers are always discouraged.

spammy != random
jayess gravatar image jayess  ( 2019-02-13 21:01:22 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2017-10-27 07:18:49 -0500

Seen: 1,237 times

Last updated: Feb 13 '19