29#include <VirtualRobot/IK/platform/MecanumPlatformKinematics.h>
30#include <VirtualRobot/IK/platform/OmniWheelPlatformKinematics.h>
67 VirtualRobot::OmniWheelPlatformKinematicsParams
kinematics{};
86 VirtualRobot::MecanumPlatformKinematicsParams
kinematics{};
Result run(const core::GlobalTrajectory &trajectory, const core::Pose &start) const
Follow trajectory starting from start, which need not be on the trajectory.
TrajectoryFollowingSimulation(const Parameters ¶ms)
This file is part of ArmarX.
PlatformModel
How the simulated base turns a commanded twist into an achieved one.
@ MecanumTorque
As OmniWheelTorque, but for a four-wheel mecanum drive.
@ OmniWheelVelocity
Bound each wheel's angular acceleration separately, so one saturating wheel also distorts the directi...
@ Cartesian
Bound the magnitude of the twist change. Direction of the change is preserved.
@ OmniWheelTorque
Bound each motor's torque and speed, using the robot's real inertia.
The per-axis command ramp the platform device applies below the navigation stack.
float maxAngularDeceleration
float dt
Control cycle of the RT loop [s]. RTUnit runs at 1 kHz and clamps dt to <= 2 ms.
float maxAngularAcceleration
bool directionPreserving
Ramp the two linear axes together instead of independently.
Limits of the four-wheel mecanum drive, as on ARMAR-6 and ARMAR-DE.
float maxWheelDeceleration
VirtualRobot::MecanumPlatformKinematicsParams kinematics
float maxWheelAcceleration
Limits of the omni-directional wheel drive, as on ARMAR-7.
VirtualRobot::OmniWheelPlatformKinematicsParams kinematics
float maxWheelDeceleration
float maxWheelAcceleration
What the ARMAR-7 drive train can actually deliver.
float motorMaxTorque
Torque bound per motor [N m]. Default is the 7.0 A MaxCurrent cap x 62.4 mNm/A.
float gearboxMaxInputSpeedRpm
Gearbox continuous input speed [rpm]. Binds before the motor on ARMAR-7.
float motorRatedTorque
Torque at RatedCurrent (7.34 A x 62.4 mNm/A) [N m]. Recorded for reference.
float motorNominalSpeedRpm
Continuous motor speed [rpm], IDX 56 M at 48 V.
PlatformInertia::Parameters robot
float gearboxEfficiency
Ignored losses are modelled as 1.0, i.e. optimistic.
float gearRatio
Motor revolutions per wheel revolution. 65536 counts/wheel-rev / 4096 counts/motor-rev.
float maxDuration
Give up after this much simulated time [s].
PlatformDynamics dynamics
What the simulated mass can actually deliver.
float dt
Control cycle [s]. CycleUtil(10) in the controller's additional task -> 10 ms.
float settledSpeedThreshold
Speed below which the robot counts as standing still [mm/s].
CommandRateLimit rateLimit
The device-side command ramp between the controller and the platform.
float goalDistanceThreshold
Consider the goal reached within this distance to the last trajectory point [mm].
float settledDuration
How long the robot has to stay below settledSpeedThreshold before giving up [s].
float finalDistanceToGoal
Distance to the last trajectory point when the run ended [mm].
float maxTrackingError
Largest cross-track error over the run [mm].
Eigen::Matrix3d massMatrix
Full mass matrix at the Home configuration, [x, y, yaw].
float maxRequiredMotorTorque
Largest motor torque demanded over the run [N m]. OmniWheelTorque only.
float maxRequiredAngularAcceleration
Largest requiredAngularAcceleration over the run [rad/s^2].
std::size_t motorTorqueSaturatedCycles
Cycles in which a motor torque bound was binding. OmniWheelTorque only.
std::size_t wheelSpeedSaturatedCycles
Cycles in which a wheel speed bound was binding. OmniWheelTorque only.
float platformMass
Platform mass and yaw inertia from the robot model. OmniWheelTorque only.
float maxRequiredLinearAcceleration
Largest requiredLinearAcceleration over the run [mm/s^2].
float maxGoalOvershoot
Furthest the robot ever got past the last trajectory point [mm].
std::size_t saturatedCycles
Number of control cycles in which any limit was binding.
std::vector< Sample > samples
bool settledShortOfGoal
Set when the run ended because the robot stopped moving short of the goal.
float trackingError
Distance from the robot to the trajectory point it is tracking [mm].
Eigen::VectorXf commandedWheelVelocities
Wheel speeds the command asks for [rev/s]. Only set for the omni-wheel model.
float linearAcceleration
Acceleration actually applied, bounded by PlatformDynamics.
bool accelerationSaturated
True when a limit was binding, i.e. the base could not follow the command.
Eigen::VectorXf requiredWheelAccelerations
Per-wheel acceleration the command asks for [rev/s^2], ignoring the limit.
Eigen::ArrayXi wheelSpeedSaturated
Which wheels hit their speed bound. Only set for OmniWheelTorque.
float distanceToGoal
Distance to the last trajectory point [mm].
core::Pose global_T_robot
Eigen::VectorXf wheelVelocities
Wheel speeds actually reached [rev/s]. Only set for the omni-wheel model.
Eigen::Vector2f commandedLinearLocal
Filtered twist as commanded to the platform, in the robot frame.
Eigen::ArrayXi motorSaturated
Which motors hit their torque bound. Only set for OmniWheelTorque.
float requiredAngularAcceleration
float dropPointVelocity
Velocity of the trajectory point the controller is currently tracking.
Eigen::ArrayXi wheelSaturated
Which wheels hit their acceleration bound. Only set for OmniWheelVelocity.
float angularAcceleration
Eigen::Vector2f commandedVelocityGlobal
Commanded linear velocity in the global frame, i.e. what the mass is asked for.
Eigen::Vector2f velocityGlobal
Achieved linear velocity in the global frame, after the acceleration limit.
Eigen::VectorXf requiredMotorTorques
Motor torque the command asks for [N m]. Only set for OmniWheelTorque.
float requiredLinearAcceleration
Acceleration needed to match the command within one cycle, ignoring the limit.
Eigen::VectorXf appliedMotorTorques
Motor torque after clipping [N m]. Only set for OmniWheelTorque.