Four wheels omnidirectional drive#

#include "navground/core/kinematics.h"
class FourWheelsOmniDriveKinematics : public virtual navground::core::Kinematics, public navground::core::WheeledKinematics#

Four Omni-differential wheels (e.g., a Robomaster)

Warning

We assume that the distance between front and back wheel centers is the same as the lateral distance.

Public Functions

inline explicit FourWheelsOmniDriveKinematics(ng_float_t max_speed = Kinematics::inf, ng_float_t wheel_axis = 0)#

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)

inline ng_float_t get_wheel_axis() const#

Gets the wheel axis.

Returns:

The axis.

inline void set_wheel_axis(ng_float_t value)#

Sets the wheel axis.

Parameters:

value[in] A positive value

inline virtual unsigned dof() const override#

Returns the degrees of freedom.

Returns:

3

virtual Twist2 twist(const WheelSpeeds &speeds) const override#

See WheeledKinematics::twist.

Parameters:

speeds[in] The wheel speeds in the order {front left, rear left, rear right, rear left}

Returns:

The corresponding twist

virtual WheelSpeeds wheel_speeds(const Twist2 &twist) const override#

See WheeledKinematics::wheel_speeds.

Parameters:

twist[in] The twist

Returns:

The corresponding wheel speeds in the order {front left, rear left, rear right, rear left}

virtual WheelSpeeds feasible_wheel_speeds(const Twist2 &twist) const override#

See WheeledKinematics::feasible_wheel_speeds.

Parameters:

twist[in] The twist

Returns:

The corresponding wheel speeds in the order {front left, rear left, rear right, rear left}