Ask Your Question
0

Ros Navigation Stack

asked 2022-06-07 10:07:10 -0500

Os7 gravatar image

I want to ask about the Navigation Stack, i have been following (https://automaticaddison.com/how-to-s...) tutorial

My question is can i complete the Navigation process without IMU sensor and sensor fusion and if so what is required from me would appreciate it if someone looked inside the tutorial in odom publishing would deleting the imu and sensor fusion launch files be enough or do i need to do more?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-09 08:34:07 -0500

Joe28965 gravatar image

You need to add something that publishes the odometry.

Odometry is telling navigation how much your robot has moved (or how much it thinks it has moved). If you don't have that, navigation assumes the robot isn't actually moving.

As for how you would do that (to catch that question in advance) it matters a lot what you're actually using as a robot. Are you using a Gazebo simulation? Then you're probably using the gazebo_ros diff_drive_controller. In that case it's as simple as setting the parameter publishOdomTF to true.

If you're using a physical robot, then the question is "how are you moving it". If you're using ros_control, you need to tell it to publish the odometry (again, by changing a parameter).

edit flag offensive delete link more

Comments

Yes a physical robot , i have been publishing odometry from Arduino to ros via encoders , it delivers the speed of the robot to ros is that enough or does the navigation stack need the encoder ticks of left and right wheels ? I move the robot using the cmd topic with teleop and all that

Os7 gravatar image Os7  ( 2022-06-09 08:43:36 -0500 )edit

Navigation only needs the odometry (which is the speed/rotation of the robot). It does not need the encoder ticks or the individual speeds of each wheel.

What it does need, is for the odometry to be published in the TF tree (take a look at the tf tree from this question). Something needs to publish that TF. I know ros_control can easily do that, but I don't know if that's what you're currently using.

If it's not, you'll need to publish the TF yourself, although it might be less of a headache to switch to using ros_control over publishing the TF yourself. Are you using a self built robot, or one that's available from somewhere?

Joe28965 gravatar image Joe28965  ( 2022-06-09 08:55:47 -0500 )edit

I see, no its a self built robot for graduation project, this is the first time i am hearing about ros_control will take a look at it and try to implement it if possible

Os7 gravatar image Os7  ( 2022-06-09 09:00:12 -0500 )edit
1

It's quite useful. Right now, I'm assuming you've written a piece of code that takes the cmd_vel and calculates the speed for each wheel.

If you use ros_control and you use the correct controller (diff_drive/ackermann/holonomic) and then configure them (setting wheel separation, wheel radius) it will calculate the speed for each wheel AND if you give it the speed of each wheel back, it will calculate the odometry and publish/broadcast the tf for you.

There are also other things you can set in ros_control like the max velocity, max acceleration, such like that.

If you've got a diff drive robot, you can take a look at the diff_drive_controller.

Joe28965 gravatar image Joe28965  ( 2022-06-09 09:15:24 -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: 2022-06-07 10:07:10 -0500

Seen: 62 times

Last updated: Jun 09