GithubHelp home page GithubHelp logo

klelkov / ackermansteer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from froohoo/ackermansteer

0.0 0.0 0.0 3.38 MB

A Gazebo / ROS plugin Implementing Ackermann steering on a 4 wheel robot

CMake 41.66% C++ 58.34%

ackermansteer's Introduction

ackermansteer

A gazebo plugin to implement ackerman steering angles on a 4 wheeled robot. Note that this plugin just computes and sets the correct angles to minimize wheel slip (both for the front steering wheels, and the rear drive). Wheel angles and speeds are both set using PID instances so some tuning will be required depending on the inertia tensor/ mass properties of your robot(especially the wheels).

A video of current progress...

Current Progress

Notes to self / Learnings:

  • SetPosition worked abysmally to set wheel angles. I'm assuming because the resulting discontinuity requires temporary interuption of the simulation... not sure need to research.
  • Ackermann is actually spelled with 2 n's.
  • PID controller is good for setting forces on wheels (runs much smoother). Not sure though if this is the current 'best practice' for setting the joint angles as I understand the joints have embedded PID controllers... but havent found the documetnation on these yet.
  • For some reason, specifiying gazebo in makefile as a catkin component does not work. Need to find_package separately, and include/link separately as well.
  • If you get a IGN_MASSMATRIX3_DEFAULT_TOLERANCE error then you probably need to do a apt-get install libignition-math2-dev

Steering angle equations:

(Plots created in Desmos. Equations rendered by Codecogs. )

These equations work for all likely steering angles where -pi/2 < steering angle < pi/2 and are graphed below. When input angle is negative (a right turn), the right wheel is the inner wheel and left wheel is the outer. Both angles are negative but the Ackermann angle for the right wheel is of greater magnitude since it tracks a circular path of smaller radius. The same applies to positive turns (a left turn) where the left(inner) wheel has a greater angle than the right(outer). As we approach 0 steer angle, both angles converge to 0.

(This plot assumes wheelbase=WheelSeparation=1).

Rear Diff Drive equations:

Rear diff drive speed calculation follows a similar logic. For positive steer angles, the rear right wheel is outermost, and thus has a higher velocity. The opposite is true for negative steer angles. The graph below shows the wheel speed as a function of target steer angle assuming wheelbase=wheelSeparation=Velocity=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.