Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
kinematics::DiffWristKinematics Class Reference

Represents the kinematics of a differential wrist. More...

#include <DiffWristKinematics.h>

Public Member Functions

jointpos_t gearPosToJointPos (const gearpos_t &gearPos) const
 Given a set of gear positions, calculate the resulting position of the joint.
 
gearpos_t jointPosToGearPos (const jointpos_t &jointPos) const
 Given a joint position, calculate the positions of the two gears.
 
jointpos_t gearPowerToJointPower (const gearpos_t &gearPwr) const
 Given the motor power of each gear, calculate the resulting power of each axis of the joint.
 
gearpos_t jointPowerToGearPower (const jointpos_t &jointPwr) const
 Given the desired power of each axis of the joint, calculate the required motor power for each of the gears.
 

Detailed Description

Represents the kinematics of a differential wrist.

A differential wrist is capable of adjusting both the pitch and roll of an end effector by driving two gears, one on each side. This class can be used to calculate the positions or motor powers of the gears given a desired joint position/power, and vice versa.

Member Function Documentation

◆ gearPowerToJointPower()

jointpos_t kinematics::DiffWristKinematics::gearPowerToJointPower ( const gearpos_t & gearPwr) const

Given the motor power of each gear, calculate the resulting power of each axis of the joint.

Parameters
gearPwrThe motor power of each gear; each value in the structure should be in the range \([-1, 1]\).
Returns
The resulting power of each axis, in the range \([-1, 1]\).
Warning
This method will always return a normalized power value in the range \([-1, 1]\); if the given gear power values would cause the joint power to be outside of this range (which should only happen if the gear power values themselves were outside of this range) then the resulting vector will be scaled to be in this range, preserving the ratio between components.

◆ jointPowerToGearPower()

gearpos_t kinematics::DiffWristKinematics::jointPowerToGearPower ( const jointpos_t & jointPwr) const

Given the desired power of each axis of the joint, calculate the required motor power for each of the gears.

Parameters
jointPwrThe desired power of each axis of the joint; each value in the structure should be in the range \([-1, 1]\).
Returns
The required power of each of the gears, in the range \([-1, 1]\).
Warning
Not all combinations of joint power are possible! This method will always return normalized gear power values in the range \([-1, 1]\); if the given joint power values would cause any gear power value to be outside of this range, then the resulting vector will be scaled to be in this range, preserving the ratio between components.

The documentation for this class was generated from the following files: