Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
Loading...
Searching...
No Matches
robot::types Namespace Reference

Types for use in the world interface. More...

Classes

class  bad_datapoint_access
 
class  DataPoint
 Represents data measured using a sensor at a given time. More...
 
class  LimitSwitchData
 A class that represents limit switches from a specific motor. More...
 

Typedefs

using dataclock = std::chrono::steady_clock
 The clock used for time measurements for data.
 
using datatime_t = std::chrono::time_point<dataclock>
 A point in time as measured by dataclock.
 
using landmarks_t = std::vector<DataPoint<navtypes::point_t>>
 A data structure that represents when each landmark was seen.
 
using CameraFrame = std::pair<cv::Mat, uint32_t>
 A pair of a camera frame and its corresponding frame number.
 
using CameraID = std::string
 The type of a camera id.
 

Enumerations

enum class  indication_t { off , autonomous , teleop , arrivedAtDest }
 An indication enum, used to command the LED to flash different signals.
 
enum class  motorid_t {
  frontLeftWheel , frontLeftSwerve , frontRightWheel , frontRightSwerve ,
  rearLeftWheel , rearLeftSwerve , rearRightWheel , rearRightSwerve ,
  armBase , shoulder , elbow , forearm ,
  wristDiffRight , wristDiffLeft , hand , activeSuspension ,
  drillActuator , drillMotor
}
 The motors on the robot.
 
enum class  mountedperipheral_t {
  none , arm , armServo , scienceStation ,
  lidar
}
 the mounted peripheral on the robot.
 
enum class  jointid_t {
  frontLeftSwerve , frontRightSwerve , rearLeftSwerve , rearRightSwerve ,
  armBase , shoulder , elbow , forearm ,
  wristPitch , wristRoll , hand , activeSuspension ,
  ikForward , ikUp
}
 

Variables

constexpr auto all_jointid_t
 
constexpr auto name_to_jointid
 
constexpr size_t N_LIMIT_SWITCH = 8
 The maximum number of limit switches associated with any motor.
 
constexpr int LIMIT_SWITCH_LIM_MIN_IDX = 0
 
constexpr int LIMIT_SWITCH_LIM_MAX_IDX = 1
 

Detailed Description

Types for use in the world interface.

Typedef Documentation

◆ landmarks_t

using robot::types::landmarks_t = std::vector<DataPoint<navtypes::point_t>>

A data structure that represents when each landmark was seen.

See also
AR::readLandmarks()

Variable Documentation

◆ all_jointid_t

auto robot::types::all_jointid_t
constexpr
Initial value:
= frozen::make_unordered_set<jointid_t>(
{jointid_t::armBase, jointid_t::shoulder, jointid_t::elbow, jointid_t::forearm,
jointid_t::wristRoll, jointid_t::wristPitch, jointid_t::hand, jointid_t::activeSuspension,
jointid_t::ikForward, jointid_t::ikUp})

◆ name_to_jointid

auto robot::types::name_to_jointid
constexpr
Initial value:
= frozen::make_unordered_map<frozen::string, jointid_t>(
{{"frontLeftSwerve", jointid_t::frontLeftSwerve},
{"frontRightSwerve", jointid_t::frontRightSwerve},
{"rearLeftSwerve", jointid_t::rearLeftSwerve},
{"rearRightSwerve", jointid_t::rearRightSwerve},
{"armBase", jointid_t::armBase},
{"shoulder", jointid_t::shoulder},
{"elbow", jointid_t::elbow},
{"forearm", jointid_t::forearm},
{"wristPitch", jointid_t::wristPitch},
{"wristRoll", jointid_t::wristRoll},
{"hand", jointid_t::hand},
{"activeSuspension", jointid_t::activeSuspension},
{"ikForward", jointid_t::ikForward},
{"ikUp", jointid_t::ikUp}})