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  CameraHandle
 
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 = uint32_t
 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 {
  leftTread , rightTread , armBase , shoulder ,
  elbow , forearm , wristDiffRight , wristDiffLeft ,
  hand , drillActuator , drillMotor , fourbar1 ,
  fourbar2 , scienceServoBoard , scienceStepperBoard
}
 The motors on the robot.
 
enum class  mountedperipheral_t { none , arm , armServo , scienceStation }
 the mounted peripheral on the robot.
 
enum class  jointid_t {
  armBase , shoulder , elbow , forearm ,
  wristPitch , wristRoll , hand , ikForward ,
  ikUp , fourBarLinkage , drillActuator , drillMotor
}
 
enum class  servoid_t {
  microscope , syringe , cuvette , filter ,
  soilBox
}
 
enum class  stepperid_t {
  plunger , judges , mast , lock ,
  lazySusan
}
 

Variables

constexpr auto all_jointid_t
 
constexpr auto name_to_jointid
 
constexpr auto all_servoid_t
 
constexpr auto name_to_servoid
 
constexpr auto servoid_to_servo_num
 
constexpr auto all_stepperid_t
 
constexpr auto name_to_stepperid
 
constexpr auto stepperid_to_stepper_num
 
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::ikForward,
jointid_t::ikUp, jointid_t::fourBarLinkage, jointid_t::drillActuator, jointid_t::drillMotor})

◆ all_servoid_t

auto robot::types::all_servoid_t
constexpr
Initial value:
= frozen::make_unordered_set<servoid_t>(
{servoid_t::microscope, servoid_t::syringe, servoid_t::soilBox,
servoid_t::cuvette, servoid_t::filter})

◆ all_stepperid_t

auto robot::types::all_stepperid_t
constexpr
Initial value:
= frozen::make_unordered_set<stepperid_t>(
{stepperid_t::plunger, stepperid_t::judges, stepperid_t::mast,
stepperid_t::lock, stepperid_t::lazySusan})

◆ name_to_jointid

auto robot::types::name_to_jointid
constexpr
Initial value:
= frozen::make_unordered_map<frozen::string, jointid_t>(
{{"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},
{"ikForward", jointid_t::ikForward},
{"ikUp", jointid_t::ikUp},
{"fourBarLinkage", jointid_t::fourBarLinkage},
{"drillActuator", jointid_t::drillActuator},
{"drillMotor", jointid_t::drillMotor}})

◆ name_to_servoid

auto robot::types::name_to_servoid
constexpr
Initial value:
= frozen::make_unordered_map<frozen::string, servoid_t>(
{{"microscope", servoid_t::microscope},
{"syringe", servoid_t::syringe},
{"cuvette", servoid_t::cuvette},
{"filter", servoid_t::filter},
{"soilBox", servoid_t::soilBox}})

◆ name_to_stepperid

auto robot::types::name_to_stepperid
constexpr
Initial value:
= frozen::make_unordered_map<frozen::string, stepperid_t>(
{{"plunger", stepperid_t::plunger},
{"judges", stepperid_t::judges},
{"mast", stepperid_t::mast},
{"lock", stepperid_t::lock},
{"lazySusan", stepperid_t::lazySusan}})

◆ servoid_to_servo_num

auto robot::types::servoid_to_servo_num
constexpr
Initial value:
= frozen::make_unordered_map<servoid_t, int>(
{{servoid_t::microscope, 7},
{servoid_t::syringe, 9},
{servoid_t::cuvette, 5},
{servoid_t::filter, 8},
{servoid_t::soilBox, 6}})

◆ stepperid_to_stepper_num

auto robot::types::stepperid_to_stepper_num
constexpr
Initial value:
= frozen::make_unordered_map<stepperid_t, uint8_t>(
{{stepperid_t::plunger, 4},
{stepperid_t::judges, 5},
{stepperid_t::mast, 2},
{stepperid_t::lock, 1},
{stepperid_t::lazySusan, 6}})