$darkmode
steering_utils.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cloe::utility::Geometry
 

Enumerations

enum class  WheelId : unsigned int { FrontLeft = 0 , FrontRight , RearLeft , RearRight }
 

Functions

double cloe::utility::calculate_wheel_angle (const Geometry &geometry, WheelId wheel_id, double steering_angle)
 

Function Documentation

◆ calculate_wheel_angle()

double cloe::utility::calculate_wheel_angle ( const Geometry geometry,
WheelId  wheel_id,
double  steering_angle 
)

This function translates a steering angle from the center of the axle to the individual steering angle of a wheel.

This function is based on the Ackermann steering geometry, see [https://en.wikipedia.org/wiki/Ackermann_steering_geometry, accessed 28.10.2022] The calculation only works for the following assumptions, as it assumes that the centre of rotation is on the same level with the rear wheels:

The function needs a wheel_base, a track_base (both stored in Geometry), the wheel_id and the steering_angle in the center of the axle. The wheel_id is the ID you want to calculate the angle for, i.e. either FrontLeft or FrontRight. The function returns the value of the steering_angle of the requested wheel.

Here is the call graph for this function:
Here is the caller graph for this function: