Two wheels differential drive#
#include "navground/core/kinematics.h"
- Two differential drive wheels (left, right) (e.g., a wheelchair) with a physical maximal wheel speed, and software-limited forward/backwards speeds. - It implements two types of kinematics constrains: - a maximal wheel speed that adds a linear coupling between linear and angular speed (e.g., the robot can move at maximal linear speed only straights) (same as TwoWheelsDifferentialDriveKinematics) 
- a controller that clamps linear and angular speed inside a box: these constrains when the related bounds are set to negative values. 
 - Registered properties: - max_forward_speed(float, get_max_forward_speed)
- max_backward_speed(float, get_max_backward_speed)
- wheel_axis(float, get_wheel_axis)
 - Subclassed by navground::core::DynamicTwoWheelsDifferentialDriveKinematics - Public Functions - Constructs a new instance. - Parameters:
- max_speed – [in] The maximal wheel speed 
- wheel_axis – [in] The wheel axis (i.e., the distance between the wheels) 
- max_angular_speed – [in] The maximal angular speed, that is also limited by the 2 * max_speed / axis, if the axis is positive. 
- max_forward_speed – [in] The maximal linear speed when moving forwards (set to negative or infinite to leave unconstrained) 
- max_backward_speed – [in] The maximal linear speed when moving backwards (set to negative or infinite to leave unconstrained) 
 
 
 - Gets the wheel axis. - Returns:
- The axis. 
 
 - Sets the wheel axis. - Parameters:
- value – [in] A positive value 
 
 - Returns the degrees of freedom. - Returns:
- 2 
 
 - Whether the agent can move backwards. - Returns:
- True if moving backwards is possible. 
 
 - Whether the agent can move forwards. - Returns:
- True if moving forwards is possible. 
 
 - Gets the maximal linear speed when moving forwards. - Returns:
- The maximal speed. 
 
 - Sets the maximal speed when moving forwards. - Parameters:
- value – [in] The desired value. A negative number is interpreted as +infinite. 
 
 - Gets the maximal linear speed when moving backwards. - Returns:
- The maximal speed. 
 
 - Sets the maximal speed when moving backwards. - Parameters:
- value – [in] The desired value. A negative number is interpreted as +infinite. 
 
 - 
- Parameters:
- speeds – [in] The wheel speeds in the order {left, right} 
- Returns:
- The corresponding twist 
 
 - See WheeledKinematics::wheel_speeds. - Parameters:
- twist – [in] The twist 
- Returns:
- The corresponding wheel speeds in the order {left, right}