4#include "world_interface/data.h"
12#include <frozen/unordered_map.h>
15using robot::types::jointid_t;
47extern const double IK_SOLVER_THRESH;
48extern const int IK_SOLVER_MAX_ITER;
62extern const std::array<motorid_t, 2>
IK_MOTORS;
68 {motorid_t::shoulder, {18200, 152500}}, {motorid_t::elbow, {-169100, 0}}};
74 {motorid_t::shoulder, 0.3848608}, {motorid_t::elbow, 0.461264}};
84extern const double ROBOT_LENGTH;
85extern const double ROBOT_WIDTH;
98extern const double WHEEL_RADIUS;
99extern const double PWM_PER_RAD_PER_SEC;
137extern const CameraID MAST_CAMERA_ID;
138extern const CameraID WRIST_CAMERA_ID;
139extern const CameraID HAND_CAMERA_ID;
141extern const std::unordered_set<robot::types::CameraID> CAMERA_SET;
142extern const std::unordered_map<robot::types::CameraID, std::string> CAMERA_CONFIG_PATHS;
156extern const std::unordered_map<CameraID, int>
STREAM_RFS;
166extern const uint16_t WS_SERVER_PORT;
205extern const double SEARCH_RADIUS_INCREMENT;
206extern const double GPS_WAYPOINT_RADIUS;
207extern const double LANDMARK_WAYPOINT_RADIUS;
211extern const double EPS;
213extern const double THETA_KP;
214extern const double DRIVE_VEL;
215extern const double SLOW_DRIVE_THRESHOLD;
216extern const double DONE_THRESHOLD;
230 {{jointid_t::armBase, motorid_t::armBase},
231 {jointid_t::shoulder, motorid_t::shoulder},
232 {jointid_t::elbow, motorid_t::elbow},
233 {jointid_t::forearm, motorid_t::forearm},
234 {jointid_t::hand, motorid_t::hand},
235 {jointid_t::drillActuator, motorid_t::drillActuator},
236 {jointid_t::drillMotor, motorid_t::drillMotor}});
238extern const double CONTROL_HZ;
duration< int64_t, milli > milliseconds
Arm constants.
Definition Constants.cpp:7
const double ELBOW_LENGTH
Length of the Elbow link, in meters.
Definition Constants.cpp:9
const double SAFETY_FACTOR
Percentage of fully extended overall arm length to limit arm extension within.
Definition Constants.cpp:10
const double SHOULDER_LENGTH
Length of the Shoulder link, in meters.
Definition Constants.cpp:8
const std::array< robot::types::jointid_t, 2 > IK_MOTOR_JOINTS
The joints corresponding to the motors used for IK in the arm.
Definition Constants.cpp:15
const std::array< robot::types::motorid_t, 2 > IK_MOTORS
The motors used in IK.
Definition Constants.cpp:18
constexpr frozen::unordered_map< motorid_t, double, IK_MOTORS.size()> SEGMENT_LENGTHS
Map from motor ids to segment length in meters.
Definition Constants.h:73
constexpr frozen::unordered_map< motorid_t, std::pair< int, int >, IK_MOTORS.size()> JOINT_LIMITS
Map from motor ids to min and max joint limits in millidegrees.
Definition Constants.h:67
const double MAX_EE_VEL
Maximum commanded end-effector velocity, in m/s.
Definition Constants.cpp:11
Camera constants.
Definition Constants.cpp:46
const std::unordered_map< robot::types::CameraID, int > STREAM_RFS
Stream-specific RF constants.
Definition Constants.cpp:64
const int H264_RF_CONSTANT
Default RF constant for H264 streams, if not specified in STREAM_RFS.
Definition Constants.cpp:63
const double MAX_WHEEL_VEL
Maximum tangential velocity for the rover's wheels.
Definition Constants.cpp:37
const double MAX_DRIVE_PWM
Can be up to 2^15 - 1 (32767), but we have limited it because driving at full speed draws a massive a...
Definition Constants.cpp:35
const double EFF_WHEEL_BASE
Effective distance between wheels.
Definition Constants.cpp:32
const double MAX_DTHETA
Maximum angular velocity (i.e.
Definition Constants.cpp:39
const double WHEEL_BASE
Distance between left and right wheels.
Definition Constants.cpp:31
const double STEER_EPSILON
Represents the allowable error in millidegrees for steer motors to still process a drive request.
Definition Constants.cpp:42
Navigation constants.
Definition Constants.cpp:78
const int MAX_ITERS
Max number of nodes expanded during A* search.
Definition Constants.cpp:82
const double RADIAN_COST
Distance (m) we could have traveled forward in the time it takes to turn 1 radian.
Definition Constants.cpp:80
const double PLAN_RESOLUTION
In meters.
Definition Constants.cpp:83
const double SAFE_RADIUS
Planner stays this far away from obstacles (m)
Definition Constants.cpp:81
const util::dseconds CLOSE_TO_TARGET_DUR_VAL
Duration long enough to confirm we are there, not so long that time is wasted.
Definition Constants.cpp:93
const double EPS
Heuristic weight for weighted A*.
Definition Constants.cpp:87
Network constants.
Definition Constants.cpp:69
const char * ARDUPILOT_PROTOCOL_NAME
Websocket server endpoint for ArduPilot protocol.
Definition Constants.cpp:74
const char * SIM_PROTOCOL_NAME
WebSocket server endpoint for the simulator protocol.
Definition Constants.cpp:73
const char * MC_PROTOCOL_NAME
WebSocket server endpoint for the mission control protocol.
Definition Constants.cpp:72
Collection of all constants used.
Definition Constants.cpp:5
constexpr auto JOINT_MOTOR_MAP
A map that pairs each of the joints to its corresponding motor.
Definition Constants.h:229
std::string CameraID
The type of a camera id.
Definition data.h:46
motorid_t
The motors on the robot.
Definition data.h:57