Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
DiffWristKinematics.h
1#pragma once
2
3#include <Eigen/Dense>
4
5namespace kinematics {
14struct gearpos_t {
22 float left;
30 float right;
31 explicit gearpos_t(float left, float right);
36 gearpos_t(const Eigen::Vector2f& vec);
41 Eigen::Vector2f vec() const;
42};
43
49struct jointpos_t {
56 float pitch;
63 float roll;
64 explicit jointpos_t(float pitch, float roll);
69 jointpos_t(const Eigen::Vector2f& vec);
74 Eigen::Vector2f vec() const;
75};
76
85public:
89 jointpos_t gearPosToJointPos(const gearpos_t& gearPos) const;
93 gearpos_t jointPosToGearPos(const jointpos_t& jointPos) const;
108 jointpos_t gearPowerToJointPower(const gearpos_t& gearPwr) const;
122 gearpos_t jointPowerToGearPower(const jointpos_t& jointPwr) const;
123};
124
125} // namespace kinematics
Represents the kinematics of a differential wrist.
Definition DiffWristKinematics.h:84
gearpos_t jointPosToGearPos(const jointpos_t &jointPos) const
Given a joint position, calculate the positions of the two gears.
Definition DiffWristKinematics.cpp:34
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...
Definition DiffWristKinematics.cpp:51
jointpos_t gearPosToJointPos(const gearpos_t &gearPos) const
Given a set of gear positions, calculate the resulting position of the joint.
Definition DiffWristKinematics.cpp:29
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.
Definition DiffWristKinematics.cpp:39
Represents the positions (or power) of the two motor-driven gears in the differential wrist.
Definition DiffWristKinematics.h:14
float right
The position (or power) of the right gear.
Definition DiffWristKinematics.h:30
gearpos_t(const Eigen::Vector2f &vec)
Constructs a set of gear positions from a 2-component vector as .
Eigen::Vector2f vec() const
Converts a set of gear positions to a 2-component vector as .
Definition DiffWristKinematics.cpp:10
float left
The position (or power) of the left gear.
Definition DiffWristKinematics.h:22
Represents the position (or power) of the differential wrist joint.
Definition DiffWristKinematics.h:49
Eigen::Vector2f vec() const
Converts a set of gear positions to a 2-component vector as .
Definition DiffWristKinematics.cpp:16
jointpos_t(const Eigen::Vector2f &vec)
Constructs a joint position from a 2-component vector as .
float pitch
The pitch of the end effector.
Definition DiffWristKinematics.h:56
float roll
The roll of the end effector.
Definition DiffWristKinematics.h:63