# Motion model for tricycle robot for AMCL

Hello!

I have a robot with three wheels where the single front wheel is for steering and driving, this wheel also has an encoder that outputs x, y and angular velocity. I want to use AMCL to localize the robot, however, I am not sure if I can use the omni or diff motion model for this robot? Is it possible or do I need to write a new model?

edit retag close merge delete

Could you explain what y means in your encoder output?

( 2019-04-29 16:04:24 -0500 )edit

The odometry coordinate system is fixed on the robot on the single front wheel with x facing forward and y facing to the left. So y measures how much the robot is turning, if the robot performs a pure rotation I have a non-zero y and angular velocity but a zero x.

( 2019-05-07 03:41:19 -0500 )edit

Hi @hannesjk, I am working on same problem. Could you please share to your model, it would be great. Thanks

( 2021-03-10 08:08:28 -0500 )edit

@ahmetunalunlu please don't post answers that are not actually answers. This is a Q&A site not a discussion forum. I've moved your answer to be a question comment. For more, please see the Support guidelines: http://wiki.ros.org/Support

( 2021-03-10 09:55:59 -0500 )edit

Sort by ยป oldest newest most voted

Hi! Here is the equation of the modified odometry model i used.

more

Is this an answer or an update?

( 2021-03-11 00:01:06 -0500 )edit

( 2021-03-11 00:42:29 -0500 )edit

The diff model will probably work well enough. The diff model assumes the robot can move forwards, backwards and rotate which is close enough to your tricycle robot.

The omni model would not be a good choice. The omni model also assumes the robot can move side to side.

more

It seems to work except for pure rotations. I think it is because I then get a non-zero angular velocity and y velocity from the wheel encoder but a zero x velocity, and this type of movement is impossible for the diff model (it corresponds to the a slide for the diff model i guess). I need to somehow add that for pure rotations there will also be a translation. Do you know how?

( 2019-04-27 05:24:34 -0500 )edit

I see. In a diff drive robot, pure rotation would only result in a theta velocity. Since you actually have Y velocities, the omni model might be a better choice.

I'm not an expert on the motion models, but I believe they just distribute the particles for the particle filter in a way that is realistic for that type of robot. Since it doesnt imply any constraints on the motion, the omni model should work for most robots but with reduced precision.

Take what I say here with a grain of salt. I've only briefly looked through the motion model code

( 2019-04-29 20:39:00 -0500 )edit
1

I ended up modifying the diff model. Before the model assumed that all motions can be divided into a rotation followed by a translation followed by another rotation. I had to modify the equations so that a rotation also leads to a translation. It worked fine then!

( 2019-05-07 03:45:19 -0500 )edit
1

That's great. This sounds like it may be useful to others as well. Please consider posting your solution. I understand you're working in ROS 1, so the best place to submit it would be https://github.com/ros-planning/navigation however, if you choose to submit to the ROS2 repo, I can work with you to get it integrated.

( 2019-05-07 15:08:43 -0500 )edit

@hannesjk, could you consider posting the solution, I am working on a similar solution.

( 2021-02-24 03:54:09 -0500 )edit