diff --git a/README.md b/README.md index ac3a790..55c6ec9 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,4 @@ baxter_common RSDK Wiki: http://github.com/RethinkRobotics/sdk-docs/wiki ## Repository Description -URDF and 3D models describing the Baxter Research Robot by Rethink Robotics Inc. +URDF, 3D models, and custom messages describing the Baxter Research Robot from Rethink Robotics Inc. diff --git a/baxter_common/package.xml b/baxter_common/package.xml index ccb9f59..bdcec9c 100644 --- a/baxter_common/package.xml +++ b/baxter_common/package.xml @@ -2,8 +2,8 @@ baxter_common 0.6.1 - URDF and meshes describing the Baxter robot from Rethink - Robotics. + URDF, meshes, and custom messages + describing the Baxter robot from Rethink Robotics. @@ -22,6 +22,7 @@ catkin baxter_description + baxter_msgs diff --git a/baxter_msgs/CMakeLists.txt b/baxter_msgs/CMakeLists.txt new file mode 100644 index 0000000..7973978 --- /dev/null +++ b/baxter_msgs/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 2.8.3) +project(baxter_msgs) + +find_package(catkin REQUIRED COMPONENTS message_generation std_msgs geometry_msgs) + +add_message_files( + FILES + AnalogIOState.msg + AnalogIOStates.msg + AnalogOutputCommand.msg + AssemblyState.msg + CalibrateArmEnable.msg + CameraControl.msg + CameraSettings.msg + DigitalIOState.msg + DigitalIOStates.msg + DigitalOutputCommand.msg + EndpointState.msg + GripperCommand.msg + GripperIdentity.msg + GripperProperties.msg + GripperState.msg + HeadPanCommand.msg + HeadState.msg + ITB.msg + ITBStates.msg + JointCommandMode.msg + JointPositions.msg + JointTorques.msg + JointVelocities.msg + RobustControllerStatus.msg + TareData.msg + TareEnable.msg + UpdateSource.msg + UpdateSources.msg + UpdateStatus.msg +) + +add_service_files( + FILES + CloseCamera.srv + ListCameras.srv + LSCores.srv + OpenCamera.srv + RMCores.srv + SolvePositionIK.srv +) + +generate_messages(DEPENDENCIES geometry_msgs std_msgs) + +catkin_package(CATKIN_DEPENDS std_msgs geometry_msgs) diff --git a/baxter_msgs/msg/AnalogIOState.msg b/baxter_msgs/msg/AnalogIOState.msg new file mode 100644 index 0000000..6df1ac4 --- /dev/null +++ b/baxter_msgs/msg/AnalogIOState.msg @@ -0,0 +1,3 @@ +time timestamp +float64 value +bool isInputOnly diff --git a/baxter_msgs/msg/AnalogIOStates.msg b/baxter_msgs/msg/AnalogIOStates.msg new file mode 100644 index 0000000..b599be9 --- /dev/null +++ b/baxter_msgs/msg/AnalogIOStates.msg @@ -0,0 +1,2 @@ +string[] names +AnalogIOState[] states \ No newline at end of file diff --git a/baxter_msgs/msg/AnalogOutputCommand.msg b/baxter_msgs/msg/AnalogOutputCommand.msg new file mode 100644 index 0000000..a58eb12 --- /dev/null +++ b/baxter_msgs/msg/AnalogOutputCommand.msg @@ -0,0 +1,4 @@ +##the name of the output +string name +##the value to set output +uint16 value diff --git a/baxter_msgs/msg/AssemblyState.msg b/baxter_msgs/msg/AssemblyState.msg new file mode 100644 index 0000000..62e2e1b --- /dev/null +++ b/baxter_msgs/msg/AssemblyState.msg @@ -0,0 +1,17 @@ +bool enabled # true if enabled +bool stopped # true if stopped -- e-stop asserted +bool error # true if a component of the assembly has an error +# +# The following are specific to the robot top-level assembly: +uint8 estop_button # One of the following: + uint8 ESTOP_BUTTON_UNPRESSED = 0 # Robot is not stopped and button is not pressed + uint8 ESTOP_BUTTON_PRESSED = 1 + uint8 ESTOP_BUTTON_UNKNOWN = 2 # STATE_UNKNOWN when estop was asserted by a non-user source + uint8 ESTOP_BUTTON_RELEASED = 3 # Was pressed, is now known to be released, but robot is still stopped. +# +uint8 estop_source # If stopped is true, the source of the e-stop. One of the following: + uint8 ESTOP_SOURCE_NONE = 0 # e-stop is not asserted + uint8 ESTOP_SOURCE_USER = 1 # e-stop source is user input (the red button) + uint8 ESTOP_SOURCE_UNKNOWN = 2 # e-stop source is unknown + uint8 ESTOP_SOURCE_FAULT = 3 # MotorController asserted e-stop in response to a joint fault + uint8 ESTOP_SOURCE_BRAIN = 4 # MotorController asserted e-stop in response to a lapse of the brain heartbeat diff --git a/baxter_msgs/msg/CalibrateArmEnable.msg b/baxter_msgs/msg/CalibrateArmEnable.msg new file mode 100644 index 0000000..0be3f2c --- /dev/null +++ b/baxter_msgs/msg/CalibrateArmEnable.msg @@ -0,0 +1,10 @@ +## @file CalibrateArmEnable.msg See the file below for additional documentation +## @addtogroup RobustControllersMsgs +## @{ +## @class RobustControllersMsgs::CalibrateArmEnable + +bool isEnabled +string uid +std_msgs/Empty data + +## @} diff --git a/baxter_msgs/msg/CameraControl.msg b/baxter_msgs/msg/CameraControl.msg new file mode 100644 index 0000000..b01ef18 --- /dev/null +++ b/baxter_msgs/msg/CameraControl.msg @@ -0,0 +1,13 @@ +int32 id +int32 value + +int32 CAMERA_CONTROL_EXPOSURE=100 +int32 CAMERA_CONTROL_GAIN=101 +int32 CAMERA_CONTROL_WHITE_BALANCE_R=102 +int32 CAMERA_CONTROL_WHITE_BALANCE_G=103 +int32 CAMERA_CONTROL_WHITE_BALANCE_B=104 +int32 CAMERA_CONTROL_WINDOW_X=105 +int32 CAMERA_CONTROL_WINDOW_Y=106 +int32 CAMERA_CONTROL_FLIP=107 +int32 CAMERA_CONTROL_MIRROR=108 +int32 CAMERA_CONTROL_RESOLUTION_HALF=109 diff --git a/baxter_msgs/msg/CameraSettings.msg b/baxter_msgs/msg/CameraSettings.msg new file mode 100644 index 0000000..9567a09 --- /dev/null +++ b/baxter_msgs/msg/CameraSettings.msg @@ -0,0 +1,4 @@ +int32 width +int32 height +float32 fps +CameraControl[] controls diff --git a/baxter_msgs/msg/DigitalIOState.msg b/baxter_msgs/msg/DigitalIOState.msg new file mode 100644 index 0000000..dc482dd --- /dev/null +++ b/baxter_msgs/msg/DigitalIOState.msg @@ -0,0 +1,7 @@ +int8 state +bool isInputOnly + +int8 OFF = 0 +int8 ON = 1 +int8 PRESSED = 1 +int8 UNPRESSED = 0 \ No newline at end of file diff --git a/baxter_msgs/msg/DigitalIOStates.msg b/baxter_msgs/msg/DigitalIOStates.msg new file mode 100644 index 0000000..c7e16a5 --- /dev/null +++ b/baxter_msgs/msg/DigitalIOStates.msg @@ -0,0 +1,2 @@ +string[] names +DigitalIOState[] states \ No newline at end of file diff --git a/baxter_msgs/msg/DigitalOutputCommand.msg b/baxter_msgs/msg/DigitalOutputCommand.msg new file mode 100644 index 0000000..eab2c95 --- /dev/null +++ b/baxter_msgs/msg/DigitalOutputCommand.msg @@ -0,0 +1,4 @@ +##the name of the output +string name +##the value to set output +bool value diff --git a/baxter_msgs/msg/EndpointState.msg b/baxter_msgs/msg/EndpointState.msg new file mode 100644 index 0000000..da8f479 --- /dev/null +++ b/baxter_msgs/msg/EndpointState.msg @@ -0,0 +1,3 @@ +geometry_msgs/Pose pose +geometry_msgs/Twist twist +geometry_msgs/Wrench wrench diff --git a/baxter_msgs/msg/GripperCommand.msg b/baxter_msgs/msg/GripperCommand.msg new file mode 100644 index 0000000..9278b8b --- /dev/null +++ b/baxter_msgs/msg/GripperCommand.msg @@ -0,0 +1,6 @@ +## General electric gripper command message +float32 position # position, as a percentage of max position; 0=closed - 100=open +float32 force # force limit, as a percentage of max force; 0=none - 100=max +float32 velocity # velocity, as a percentage of max velocity; 0=none - 100=max +float32 holding # holding force, as a percentage of max velocity; 0=none - 100=max +float32 deadZone # dead zone, as a percentage of max position; 0=none - 100=max \ No newline at end of file diff --git a/baxter_msgs/msg/GripperIdentity.msg b/baxter_msgs/msg/GripperIdentity.msg new file mode 100644 index 0000000..ec7ea16 --- /dev/null +++ b/baxter_msgs/msg/GripperIdentity.msg @@ -0,0 +1,14 @@ +string name # Gripper type name +uint8 type # Gripper type identifier +# Heartland gripper type enumeration: + uint8 NO_GRIPPER = 0 + uint8 SUCTION_CUP_GRIPPER = 1 + uint8 PNEUMATIC_GRIPPER = 2 + uint8 ELECTRIC_GRIPPER = 128 +# +uint8 hardware_id # Gripper hardware id +# Gripper hardware id enumeration: + uint8 INVALID_GRIPPER_HARDWARE_ID = 0 +uint8 version_major # Gripper version, 0 if none +uint8 version_minor # Gripper version, 0 if none +uint8 revision_lsb # Gripper revision number, 0 if none diff --git a/baxter_msgs/msg/GripperProperties.msg b/baxter_msgs/msg/GripperProperties.msg new file mode 100644 index 0000000..3fc9998 --- /dev/null +++ b/baxter_msgs/msg/GripperProperties.msg @@ -0,0 +1,6 @@ +# Gripper properties +# +bool hasForce # true if the gripper has force control +bool hasPosition # true if the gripper has position control +bool isReverse # true if the gripper grips when opened + diff --git a/baxter_msgs/msg/GripperState.msg b/baxter_msgs/msg/GripperState.msg new file mode 100644 index 0000000..ea6dda6 --- /dev/null +++ b/baxter_msgs/msg/GripperState.msg @@ -0,0 +1,39 @@ +# The following Gripper State fields are tristate: 0 = false; 1 = true; 2 = unknown/unsupported + uint8 STATE_FALSE = 0 + uint8 STATE_TRUE = 1 + uint8 STATE_UNKNOWN = 2 +# +uint8 enabled # true if enabled +uint8 calibrated # true if calibration has completed +uint8 ready # true if ready to grip +uint8 moving # true if moving +uint8 gripping # true if gripping +uint8 missed # true if GRIP/GOTO/SET was commanded and the gripper reaches the end of travel +uint8 error # true if the gripper is in an error state +# +uint8 command # current gripper command, one of the following: + # Note that while these have the same as values as the gripper opcodes they + # are not used that way. + uint8 CMD_IDLE = 0 + uint8 CMD_GET_ID = 1 + uint8 CMD_RESET_ALL = 2 + uint8 CMD_RESET_FSM = 3 + uint8 CMD_CALIBRATE = 4 + uint8 CMD_PREPARE_TO_GRIP = 5 + uint8 CMD_GRIP = 6 + uint8 CMD_RELEASE = 7 + uint8 CMD_GOTO = 8 + uint8 CMD_STOP = 9 + uint8 CMD_SET = 10 + uint8 CMD_CLEAR_CALIBRATION = 11 +# +float32 position # position as a percentage of the max position; 0=closed - 100=open +# + float32 POSITION_CLOSED = 0.0 + float32 POSITION_OPEN = 100.0 +# +float32 force # force as a percentage of max force; 0=none - 100=max +# + float32 FORCE_MIN = 0.0 + float32 FORCE_MAX = 100.0 +# diff --git a/baxter_msgs/msg/HeadPanCommand.msg b/baxter_msgs/msg/HeadPanCommand.msg new file mode 100644 index 0000000..849674a --- /dev/null +++ b/baxter_msgs/msg/HeadPanCommand.msg @@ -0,0 +1,4 @@ +#Header header +float32 target # radians for target, 0 str +int32 speed # between 0 and 100, 100 = max + diff --git a/baxter_msgs/msg/HeadState.msg b/baxter_msgs/msg/HeadState.msg new file mode 100644 index 0000000..e2aee32 --- /dev/null +++ b/baxter_msgs/msg/HeadState.msg @@ -0,0 +1,3 @@ +float32 pan +bool isPanning +bool isNodding diff --git a/baxter_msgs/msg/ITB.msg b/baxter_msgs/msg/ITB.msg new file mode 100644 index 0000000..a8c23e5 --- /dev/null +++ b/baxter_msgs/msg/ITB.msg @@ -0,0 +1,13 @@ +bool[4] buttons +bool up +bool down +bool left +bool right +uint8 wheel + + +# true if the inner light is on, false if not +bool innerLight + +# true if the outer light is on, false if not +bool outerLight diff --git a/baxter_msgs/msg/ITBStates.msg b/baxter_msgs/msg/ITBStates.msg new file mode 100644 index 0000000..326d61a --- /dev/null +++ b/baxter_msgs/msg/ITBStates.msg @@ -0,0 +1,3 @@ +# used when publishing multiple itbs +string[] names +ITB[] states \ No newline at end of file diff --git a/baxter_msgs/msg/JointCommandMode.msg b/baxter_msgs/msg/JointCommandMode.msg new file mode 100644 index 0000000..3bd7ed0 --- /dev/null +++ b/baxter_msgs/msg/JointCommandMode.msg @@ -0,0 +1,4 @@ +uint8 POSITION=1 +uint8 VELOCITY=2 +uint8 TORQUE=3 +uint8 mode diff --git a/baxter_msgs/msg/JointPositions.msg b/baxter_msgs/msg/JointPositions.msg new file mode 100644 index 0000000..74168a9 --- /dev/null +++ b/baxter_msgs/msg/JointPositions.msg @@ -0,0 +1,4 @@ +# Joint angles in radians: +float64[] angles +# A list of names associated with the above angles +string[] names \ No newline at end of file diff --git a/baxter_msgs/msg/JointTorques.msg b/baxter_msgs/msg/JointTorques.msg new file mode 100644 index 0000000..8b43c31 --- /dev/null +++ b/baxter_msgs/msg/JointTorques.msg @@ -0,0 +1,4 @@ +# Joint torques in Nm: +float64[] torques +# A list of names associated with the above torques +string[] names diff --git a/baxter_msgs/msg/JointVelocities.msg b/baxter_msgs/msg/JointVelocities.msg new file mode 100644 index 0000000..c32c9b1 --- /dev/null +++ b/baxter_msgs/msg/JointVelocities.msg @@ -0,0 +1,4 @@ +# Joint velocities in radians/sec: +float64[] velocities +# A list of names associated with the above velocities +string[] names diff --git a/baxter_msgs/msg/RobustControllerStatus.msg b/baxter_msgs/msg/RobustControllerStatus.msg new file mode 100644 index 0000000..ef777f6 --- /dev/null +++ b/baxter_msgs/msg/RobustControllerStatus.msg @@ -0,0 +1,23 @@ +# True if the RC is enabled and running, false if not. +bool isEnabled + +# The state of the RC with respect to its completion goal. One of +# NOT_COMPLETE, COMPLETE_W_FAILURE, or COMPLETE_W_SUCCESS +int32 complete +int32 NOT_COMPLETE = 0 +int32 COMPLETE_W_FAILURE = 1 +int32 COMPLETE_W_SUCCESS = 2 + +# Identifies the sender of the Enable message that the RC is using for its +# commands. This should correspond to the "uid" field of a recently published +# RC *Enable message. +string controlUid + +# Set to true when the RC self-disables as a result of too much time elapsing +# without receiving an Enable message. +bool timedOut + +# A list of relevant error codes. Error codes are defined by the individual +# robust controllers, consult a robust controller's documentation to see what +# error codes it generates. +string[] errorCodes diff --git a/baxter_msgs/msg/TareData.msg b/baxter_msgs/msg/TareData.msg new file mode 100644 index 0000000..3bff73a --- /dev/null +++ b/baxter_msgs/msg/TareData.msg @@ -0,0 +1 @@ +bool tuneGravitySpring diff --git a/baxter_msgs/msg/TareEnable.msg b/baxter_msgs/msg/TareEnable.msg new file mode 100644 index 0000000..69c1fb2 --- /dev/null +++ b/baxter_msgs/msg/TareEnable.msg @@ -0,0 +1,3 @@ +bool isEnabled +string uid +baxter_msgs/TareData data diff --git a/baxter_msgs/msg/UpdateSource.msg b/baxter_msgs/msg/UpdateSource.msg new file mode 100644 index 0000000..c10a7f9 --- /dev/null +++ b/baxter_msgs/msg/UpdateSource.msg @@ -0,0 +1,4 @@ +string devname +string filename +string version +string uuid diff --git a/baxter_msgs/msg/UpdateSources.msg b/baxter_msgs/msg/UpdateSources.msg new file mode 100644 index 0000000..c1b9f68 --- /dev/null +++ b/baxter_msgs/msg/UpdateSources.msg @@ -0,0 +1,2 @@ +string uuid +UpdateSource[] sources diff --git a/baxter_msgs/msg/UpdateStatus.msg b/baxter_msgs/msg/UpdateStatus.msg new file mode 100644 index 0000000..62b7bdd --- /dev/null +++ b/baxter_msgs/msg/UpdateStatus.msg @@ -0,0 +1,20 @@ +# See the class UpdateRunner() +# status: One-word description of the current action being performed +# long_description: Details pertaining to status if any. Used for verbose error messages. + +uint16 status +float32 progress +string long_description + +uint16 STS_IDLE = 0 +uint16 STS_INVALID = 1 +uint16 STS_BUSY = 2 +uint16 STS_CANCELLED = 3 +uint16 STS_ERR = 4 +uint16 STS_MOUNT_UPDATE = 5 +uint16 STS_VERIFY_UPDATE = 6 +uint16 STS_PREP_STAGING = 7 +uint16 STS_MOUNT_STAGING = 8 +uint16 STS_EXTRACT_UPDATE = 9 +uint16 STS_LOAD_KEXEC = 10 + diff --git a/baxter_msgs/package.xml b/baxter_msgs/package.xml new file mode 100644 index 0000000..cf233ed --- /dev/null +++ b/baxter_msgs/package.xml @@ -0,0 +1,33 @@ + + + baxter_msgs + 0.6.1 + + Messages and Services required for communication + with the Baxter robot from Rethink Robotics. + + + + Rethink Robotics Inc. + + BSD + http://www.rethinkrobotics.com + + https://github.com/RethinkRobotics/sdk-examples + + + https://github.com/RethinkRobotics/sdk-examples/issues + + Rethink Robotics Inc. + + catkin + + message_generation + std_msgs + geometry_msgs + + message_runtime + std_msgs + geometry_msgs + + diff --git a/baxter_msgs/srv/CloseCamera.srv b/baxter_msgs/srv/CloseCamera.srv new file mode 100644 index 0000000..c23769a --- /dev/null +++ b/baxter_msgs/srv/CloseCamera.srv @@ -0,0 +1,3 @@ +string name +--- +int32 err diff --git a/baxter_msgs/srv/LSCores.srv b/baxter_msgs/srv/LSCores.srv new file mode 100644 index 0000000..82fce7d --- /dev/null +++ b/baxter_msgs/srv/LSCores.srv @@ -0,0 +1,2 @@ +--- +string[] cores diff --git a/baxter_msgs/srv/ListCameras.srv b/baxter_msgs/srv/ListCameras.srv new file mode 100644 index 0000000..1f1154b --- /dev/null +++ b/baxter_msgs/srv/ListCameras.srv @@ -0,0 +1,2 @@ +--- +string[] cameras diff --git a/baxter_msgs/srv/OpenCamera.srv b/baxter_msgs/srv/OpenCamera.srv new file mode 100644 index 0000000..225e4ff --- /dev/null +++ b/baxter_msgs/srv/OpenCamera.srv @@ -0,0 +1,4 @@ +string name +CameraSettings settings +--- +int32 err diff --git a/baxter_msgs/srv/RMCores.srv b/baxter_msgs/srv/RMCores.srv new file mode 100644 index 0000000..901994e --- /dev/null +++ b/baxter_msgs/srv/RMCores.srv @@ -0,0 +1,4 @@ +string core +--- +int32 err +string err_str diff --git a/baxter_msgs/srv/SolvePositionIK.srv b/baxter_msgs/srv/SolvePositionIK.srv new file mode 100644 index 0000000..65feadf --- /dev/null +++ b/baxter_msgs/srv/SolvePositionIK.srv @@ -0,0 +1,4 @@ +geometry_msgs/PoseStamped[] pose_stamp +--- +baxter_msgs/JointPositions[] joints +bool[] isValid