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

how to setup navigation stack folders

asked 2015-12-02 11:22:29 -0600

maciejm gravatar image

Hi Everyone,

I've been trying to study ROS for a week now getting no where. I can build pushers listeners and understand basic ROS structure without an issue however Im having issues with how to set up the navigation stack for sensors and odometry. I'm really confused about how to include the packages and package types. Should tf sensors and odometry be implemented by myself in separate packages? If so is there any guideline? The tutorials aren't comprehensive enough for my understanding. I tried to look for how to set these up or find some ready made projects with navigation stack so I could guide myself but couldn't find all. Any help will be extremely appreciated.

Kind regards, Maciej

edit retag flag offensive close merge delete

Comments

The turtlebot_navigation package has a few tutorials that allow you to run the full navstack w/ a simulated turtlebot.

jarvisschultz gravatar image jarvisschultz  ( 2015-12-09 07:49:19 -0600 )edit

The launch files and configuration files in the turtlebot_navigation package would be a good way to see how to configure the navstack.

jarvisschultz gravatar image jarvisschultz  ( 2015-12-09 08:02:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-09 05:18:03 -0600

mohsen1989m gravatar image

You need to write your own packages as follows:

1- TF tree publisher: http://wiki.ros.org/navigation/Tutori...

2- Odometry publisher: http://wiki.ros.org/navigation/Tutori...

3- There must be a node subscribing to the "cmd_vel" topic that is capable of taking (vx, vy, vtheta) <==> (cmd_vel.linear.x, cmd_vel.linear.y, cmd_vel.angular.z). To do this you create a subscriber with a call back like follows:

subscriber:

ros::Subscriber sub = n.subscribe("cmd_vel", 1, movecallback);

And the call back would be:

void movecallback(const geometry_msgs::Twist::ConstPtr& vel)
{
  //ROS_INFO("I heard: [%s]", msg->data.c_str());
  geometry_msgs::Twist new_vel = *vel;
  float v = sqrt (new_vel.linear.x * new_vel.linear.x + new_vel.linear.y * new_vel.linear.y);
  float vth = new_vel.angular.z;
  // here you need to send v and vth as linear and angular velocities to your robot
  }

For the rest you need to setup launch files as described here: http://wiki.ros.org/navigation/Tutori... . You need to also install gmapping to be able to create a map, navigation stack do not work without a map unless you change its default to do slam.

Hope it helps Mohsen

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-02 11:22:29 -0600

Seen: 896 times

Last updated: Dec 09 '15