{"id":441,"date":"2017-10-26T19:38:10","date_gmt":"2017-10-26T19:38:10","guid":{"rendered":"http:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/?page_id=441"},"modified":"2017-11-21T20:05:06","modified_gmt":"2017-11-21T20:05:06","slug":"apis","status":"publish","type":"page","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/documentation\/apis\/","title":{"rendered":"APIs"},"content":{"rendered":"<h3>Overall ROS Architecture<\/h3>\n<figure id=\"attachment_527\" aria-describedby=\"caption-attachment-527\" style=\"width: 1024px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-content\/uploads\/sites\/30\/2017\/10\/rosgraph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-527\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-content\/uploads\/sites\/30\/2017\/10\/rosgraph.png\" alt=\"\" width=\"1024\" height=\"252\" \/><\/a><figcaption id=\"caption-attachment-527\" class=\"wp-caption-text\">rqt_graph<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h3>Pose Estimation APIs<\/h3>\n<p>Here are some caveats for the IMU:<\/p>\n<ul>\n<li>the yaw of the IMU pose measurement will drift over time;<\/li>\n<li>the x-, y- and z-axis of the IMU frame points the right, the front and the top, respectively;<\/li>\n<li>the distance unit is <em>m<\/em> (meter) and the angle unit is <em>rad<\/em> (radian) for the IMU measurements.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>IMU Pose Measurement<\/h4>\n<p>Read the IMU sensor pose measurement data, which include orientation, angular velocity, linear acceleration along with their covariance matrices.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>IMU sensor pose measurement data for AutoKrawler 1:\u00a0<strong>\/ak1\/imu\/data<\/strong><\/li>\n<li>IMU sensor pose measurement data for AutoKrawler 2:\u00a0<strong>\/<\/strong><strong>ak2\/imu\/data<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>sensor_msgs\/Imu<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>):\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): the frame of the IMU link (<strong>ak[?]_imu_link<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li><strong>orientation<\/strong> (<strong>geometry_msgs\/Quaternion<\/strong>): the mean orientation of the IMU link\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): quarternion x component<\/li>\n<li><b>y<\/b> (<strong>float64<\/strong>):\u00a0quarternion y component<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>):\u00a0quarternion z component<\/li>\n<li><strong>w<\/strong> (<strong>float64<\/strong>):\u00a0quarternion w component<\/li>\n<\/ul>\n<\/li>\n<li><strong>orientation_covariance<\/strong> (<strong>float64[9]<\/strong>): the covariance matrix of the orientation in Euler angle format<\/li>\n<li><strong>angular_velocity<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean angular velocity of the IMU link\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the angular velocity about the x-axis<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>): the angular velocity about the y-axis<\/li>\n<li><b>z<\/b> (<strong>float64<\/strong>): the angular velocity about the z-axis<\/li>\n<\/ul>\n<\/li>\n<li><strong>angular_velocity_covariance<\/strong> (<strong>float64[9]<\/strong>): the covariance matrix of the angular velocity.<\/li>\n<li><strong>linear_acceleration<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean linear acceleration of the IMU link\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the linear acceleration along the x-axis<\/li>\n<li><b>y<\/b> (<strong>float64<\/strong>): the linear acceleration along the y-axis<\/li>\n<li><b>z<\/b> (<strong>float64<\/strong>): the linear acceleration along the z-axis<\/li>\n<\/ul>\n<\/li>\n<li><strong>linear_acceleration_covariance<\/strong> (<strong>float64[9]<\/strong>): the covariance matrix of the linear acceleration<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>IMU RPY Measurement<\/h4>\n<p>Read the IMU orientation measurement represented by roll, pitch and yaw.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>IMU RPY measurement for AutoKrawler 1: <strong>\/ak1\/imu\/rpy<\/strong><\/li>\n<li>IMU RPY measurement for AutoKrawler 2:\u00a0<strong>\/ak2\/imu\/rpy<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>geometry_msgs\/Vector3Stamped<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>):\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): the frame of the IMU link (<strong>ak[?]_imu_link<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li><strong>vector<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the magnetic field measurement by the IMU\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the roll of the IMU link<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):the pitch of the IMU link<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>):the yaw of the IMU link, and note that this component will drift over time<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>IMU Magnetic Field Measurement<\/h4>\n<p>Read the IMU magnetic field measurement. Notice that this information is not used in odometry state estimation, because the IMU is inside the AutoKrawler and surrounded by a metal shell and wires, so the magnetic field measurement does not accurately reflect the magnetic field of the Earth. Furthermore, it is not reasonable to assume that other planets have the same magnetic fields as the Earth.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>IMU magnetic field measurement for AutoKrawler 1: <strong>\/ak1\/imu\/mag<\/strong><\/li>\n<li>IMU magnetic field measurement for AutoKrawler 2:\u00a0<strong>\/ak2\/imu\/mag<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>geometry_msgs\/Vector3Stamped<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>):\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): the frame of the IMU link (<strong>ak[?]_imu_link<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li><strong>vector<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the magnetic field measurement by the IMU\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the magnetic force sensed along the x-axis<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):\u00a0the magnetic force sensed along the y-axis<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>):\u00a0the magnetic force sensed along the z-axis<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Wheel Encoders<\/h4>\n<p>Read the wheel encoders sensor data.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Wheel encoders sensor data for AutoKrawler 1:\u00a0<strong>\/ak1\/joint_states<\/strong><\/li>\n<li>Wheel encoders sensor data for AutoKrawler 2:\u00a0<strong>\/<\/strong><strong>ak2\/joint_states<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>sensor_msgs\/JointState<\/strong>):\n<ul>\n<li><strong>\u00a0header<\/strong> (<strong>std_msgs\/Header<\/strong>): the header of the message\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>name<\/strong> (<strong>string[]<\/strong>): the names of the joints (<strong>[&#8216;front_drive&#8217;, &#8216;rear_drive&#8217;, &#8216;front_steer&#8217;, &#8216;rear_steer&#8217;]<\/strong>)<\/li>\n<li><strong>position<\/strong> (<strong>float64[]<\/strong>): the encoder positions corresponding of the joints indicated by their names<\/li>\n<li><strong>velocity<\/strong> (<strong>float64[]<\/strong>): the encoder velocities corresponding of the joints indicated by their names<\/li>\n<li><strong>effort<\/strong> (<strong>float64[]<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Wheel Odometry<\/h4>\n<p>Read the wheel odometry data, which comes from the fusion of the sensor data of the joint encoders.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Wheel odometry for AutoKrawler 1:\u00a0<strong>\/ak1\/odom<\/strong><\/li>\n<li>Wheel odometry for AutoKrawler 2:\u00a0<strong>\/<\/strong><strong>ak2\/odom<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>nav_msgs\/Odometry<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>): the header of the message\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): the base frame (<strong>ak[n]_odom<\/strong>)<\/li>\n<li><strong>child_frame_id<\/strong> (<strong>string<\/strong>): the odometry frame with respect to the base frame\u00a0 (<strong>ak[n]_base_link<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li><strong>pose<\/strong>\u00a0(<strong>geometry_msgs\/PoseWithCovariance<\/strong>): the pose of the AutoKrawler defined by its mean and covariance matrix\n<ul>\n<li><strong>pose<\/strong> (<strong>geometry_msgs\/Pose<\/strong>): the mean of the pose\n<ul>\n<li><strong>position<\/strong> (<strong>geometry_msgs\/Point<\/strong>): the mean position of the AutoKrawler\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the mean x-axis coordinate of the AutoKrawler<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):\u00a0the mean y-axis coordinate of the AutoKrawler<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>orientation<\/strong> (<strong>geometry_msgs\/Quaternion<\/strong>): the mean orientation of the AutoKrawler\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><b>y<\/b> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): coupled with <strong>w<\/strong> part<\/li>\n<li><strong>w<\/strong> (<strong>float64<\/strong>): coupled with <strong>z<\/strong> part<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>covariance<\/strong> (<strong>float64[36]<\/strong>): the covariance matrix for the pose (*unknown: why the dimension does not match the pose dimension)<\/li>\n<\/ul>\n<\/li>\n<li><strong>twist<\/strong> (<strong>geometry_msgs\/TwistWithCovariance<\/strong>): the twist (pose velocity) of the AutoKrawler defined by its mean and covariance matrix\n<ul>\n<li><strong>twist<\/strong> (<strong>geometry_msgs\/Twist<\/strong>): the mean of the velocity\n<ul>\n<li><strong>linear<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean linear velocity\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the mean linear velocity component along the x-axis of the AutoKrawler<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):\u00a0the mean linear velocity component along the y-axis of the AutoKrawler<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>angular<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean angular velocity\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): the mean angular velocity of the AutoKrawler on the floor<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>covariance<\/strong> (<strong>float64[36]<\/strong>): the covariance matrix of the velocity<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><\/h3>\n<h4>Sensor Fusion for Odometry<\/h4>\n<p>Read the sensor fusion data for odometry, whose source sesnsor data come from the IMU sensor, the GPS module, and the wheel odometry module.<\/p>\n<ul>\n<li>Configuration File:\n<ul>\n<li>Odometry sensor fusion configuration file for AutoKrawler 1: ~<strong>\/catkin_ws\/src\/<\/strong><strong>autokrawler\/params\/ekf_template_ak1.yaml<\/strong><\/li>\n<li>Odometry sensor fusion configuration file for AutoKrawler 2:\u00a0<strong>~\/catkin_ws\/src\/<\/strong><strong>autokrawler\/params\/ekf_template_ak2.yaml<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>ROS Topic:\n<ul>\n<li>Odometry sensor fusion for AutoKrawler 1:\u00a0<strong>\/ak1\/odometry\/filtered<\/strong><\/li>\n<li>Odometry sensor fusion for AutoKrawler 2:\u00a0<strong>\/<\/strong><strong>ak2\/odometry\/filtered<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>nav_msgs\/Odometry<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>): the header of the message\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): the sequence of the message<\/li>\n<li><strong>stamp<\/strong> (<strong>ROS::Time<\/strong>): the time stamp of the message<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): the base frame (<strong>ak[n]_odom<\/strong>)<\/li>\n<li><strong>child_frame_id<\/strong> (<strong>string<\/strong>): the odometry frame with respect to the base frame\u00a0 (<strong>ak[n]_base_link<\/strong>)<\/li>\n<\/ul>\n<\/li>\n<li><strong>pose<\/strong>\u00a0(<strong>geometry_msgs\/PoseWithCovariance<\/strong>): the pose of the AutoKrawler defined by its mean and covariance matrix\n<ul>\n<li><strong>pose<\/strong> (<strong>geometry_msgs\/Pose<\/strong>): the mean of the pose\n<ul>\n<li><strong>position<\/strong> (<strong>geometry_msgs\/Point<\/strong>): the mean position of the AutoKrawler\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the mean x-axis coordinate of the AutoKrawler<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):\u00a0the mean y-axis coordinate of the AutoKrawler<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>orientation<\/strong> (<strong>geometry_msgs\/Quaternion<\/strong>): the mean orientation of the AutoKrawler\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><b>y<\/b> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): coupled with <strong>w<\/strong> part<\/li>\n<li><strong>w<\/strong> (<strong>float64<\/strong>): coupled with <strong>z<\/strong> part<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>covariance<\/strong> (<strong>float64[36]<\/strong>): the covariance matrix for the pose (*unknown: why the dimension does not match the pose dimension)<\/li>\n<\/ul>\n<\/li>\n<li><strong>twist<\/strong> (<strong>geometry_msgs\/TwistWithCovariance<\/strong>): the twist (pose velocity) of the AutoKrawler defined by its mean and covariance matrix\n<ul>\n<li><strong>twist<\/strong> (<strong>geometry_msgs\/Twist<\/strong>): the mean of the velocity\n<ul>\n<li><strong>linear<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean linear velocity\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the mean linear velocity component along the x-axis of the AutoKrawler<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>):\u00a0the mean linear velocity component along the y-axis of the AutoKrawler<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>angular<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): the mean angular velocity\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): the mean angular velocity of the AutoKrawler on the floor<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>covariance<\/strong> (<strong>float64[36]<\/strong>): the covariance matrix of the velocity<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Joystick APIs and Protocols<\/h3>\n<h4>General Joystick Messages<\/h4>\n<p>Publish joystick message for different models of joysticks.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Joystick for AutoKrawler 1: <strong>\/ak1\/joy<\/strong><\/li>\n<li>Joystick for AutoKrawler 2: <strong>\/ak2\/joy<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>sensor_msgs\/Joy<\/strong>):\n<ul>\n<li><strong>header<\/strong> (<strong>std_msgs\/Header<\/strong>): header of the message\n<ul>\n<li><strong>seq<\/strong> (<strong>uint32<\/strong>): message sequence number<\/li>\n<li><strong>stamp<\/strong> (<strong>time<\/strong>): message time stamp<\/li>\n<li><strong>frame_id<\/strong> (<strong>string<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>axes<\/strong> (<strong>float32[]<\/strong>): analog values of different axes of the joystick, in [-1.0, 1.0]<\/li>\n<li><strong>buttons<\/strong> (<strong>int32[]<\/strong>): boolean values with each indicating if a button is pressed or not, in {0, 1} ~ {released, pressed}<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Dualshock4 Joystick Protocol<\/h4>\n<ul>\n<li>Axes:\n<ul>\n<li><strong>[0]<\/strong>\u00a0left joy left-right: [-1.0, 1.0] ~ [right, left] ~ [roll right, roll left]<\/li>\n<li><strong>[1]<\/strong>\u00a0left joy up-down: [-1.0, 1.0] ~ [down, up] ~ [backward, forward]<\/li>\n<li><strong>[2]<\/strong>\u00a0right joy left-right: [-1.0, 1.0] ~ [right, left] ~ [yaw clockwise, yaw counter-clockwise]<\/li>\n<li><strong>[3]<\/strong>\u00a0L2 analog button: [-1.0, 1.0] ~ [pressed, released] ~ reserved<\/li>\n<li><strong>[4]<\/strong>\u00a0R2 analog button: [-1.0, 1.0] ~ [pressed, released] ~ reserved<\/li>\n<li><strong>[5]<\/strong>\u00a0right joy up-down: [-1.0, 1.0] ~ [down, up] ~ [descend, ascend]<\/li>\n<li><strong>[6]<\/strong>\u00a0left pad left-right: {-1.0, 0.0, 1.0} ~ {right, released, left} ~ {open claw, stop claw, close claw}<\/li>\n<li><strong>[7]<\/strong>\u00a0left pad up-down:\u00a0{-1.0, 0.0, 1.0} ~ {down, released, up} ~ {retract winch, stop winch, release winch}<\/li>\n<\/ul>\n<\/li>\n<li>Buttons:\n<ul>\n<li><strong>[0]<\/strong>\u00a0right pad square\/left: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[1]<\/strong>\u00a0right pad cross\/down: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[2]<\/strong>\u00a0right pad circle\/right: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[3]<\/strong>\u00a0right pad triangle\/up: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[4]<\/strong>\u00a0L1 button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[5]<\/strong>\u00a0R1 button: {0, 1} ~ {released, pressed} ~ dead-man switch<\/li>\n<li><strong>[6]<\/strong>\u00a0L2 analog button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[7]<\/strong>\u00a0R2 analog button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[8]<\/strong>\u00a0SHARE button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[9]<\/strong>\u00a0OPTIONS button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[10]<\/strong>\u00a0?: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[11]<\/strong>\u00a0?: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[12]<\/strong>\u00a0Playstation button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<li><strong>[13]<\/strong>\u00a0middle pad as a button: {0, 1} ~ {released, pressed} ~ reserved<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Rover Status Monitoring APIs<\/h3>\n<h4>IMU Temperature Measurement<\/h4>\n<p>Read the IMU temperature measurement for the AutoKrawler core.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>IMU temperature measurement for AutoKrawler 1: <strong>\/ak1\/imu\/temperature<\/strong><\/li>\n<li>IMU temperature measurement for AutoKrawler 2:\u00a0<strong>\/ak2\/imu\/temperature<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/Float32<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<strong>float32<\/strong>): the temperature of the AutoKrawler core measured by the IMU<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Battery Voltage<\/h4>\n<p>Read the current voltage of the battery.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Battery voltage for AutoKrawler 1: <strong>\/ak1\/diagnostics\/battery_voltage<\/strong><\/li>\n<li>Battery voltage for AutoKrawler 2:\u00a0<strong>\/ak2\/diagnostics\/battery_voltage<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/Float32<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<strong>float32<\/strong>): the current voltage of the battery<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Locomotion APIs<\/h3>\n<h4>Ackermann Drive<\/h4>\n<p>Tell the rover to drive in Ackermann steering mode.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Ackermann drive for AutoKrawler 1:\u00a0<strong>\/ak1\/cmd_vel<\/strong><\/li>\n<li>Ackermann drive for AutoKrawler 2:\u00a0<strong>\/<\/strong><strong>ak2\/cmd_vel<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>geometry_msgs\/Twist<\/strong>):\n<ul>\n<li><strong>linear<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): velocity control\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): the velocity magnitude driving forward, in [-1.0, 1.0] ~ [forward, backward], note that the winch is at the rear of the rover<\/li>\n<li><strong>y<\/strong>\u00a0(<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong>\u00a0(<strong>float64<\/strong>): reserved<\/li>\n<\/ul>\n<\/li>\n<li><strong>angular<\/strong> (<strong>geometry_msgs\/Vector3<\/strong>): steering control\n<ul>\n<li><strong>x<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>y<\/strong> (<strong>float64<\/strong>): reserved<\/li>\n<li><strong>z<\/strong> (<strong>float64<\/strong>): the Ackermann steering angle magnitude, in [-0.7, 0.7] ~ [left, right], note that both the front and the rear Ackermann steering servos will actuate<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Towing Status Monitoring APIs<\/h3>\n<h4>Towing Winch Status Monitoring<\/h4>\n<p>Monitor the towing winch status.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing winch status monitoring for AutoKrawler 1: <strong>\/ak1\/towing\/winch\/status<\/strong><\/li>\n<li>Towing winch status monitoring for AutoKrawler 2: <strong>\/ak2\/towing\/winch\/status<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<b>uint16<\/b>): can be <strong>1<\/strong> (&#8220;<strong>retracted<\/strong>&#8220;), <strong>3<\/strong>\u00a0(&#8220;<strong>retracting<\/strong>&#8220;), <strong>2<\/strong> (&#8220;<strong>released<\/strong>&#8220;), <strong>4<\/strong>\u00a0(&#8220;<strong>releasing<\/strong>&#8220;) or <strong>0<\/strong> (&#8220;<strong>stopped<\/strong>&#8220;) which indicates the current status of the towing winch.\u00a0Note that the status shall be published in a constant frequency all the time.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Towing Claw Status Monitoring<\/h4>\n<p>Monitor the towing claw status.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing claw status monitoring for AutoKrawler 1: <strong>\/ak1\/towing\/claw\/status<\/strong><\/li>\n<li>Towing claw status monitoring for AutoKrawler 2: <strong>\/ak2\/towing\/claw\/status<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<b>uint16<\/b>): can be <strong>1<\/strong>\u00a0(&#8220;<strong>closed<\/strong>&#8220;), <strong>3<\/strong>\u00a0(&#8220;<strong>closing<\/strong>&#8220;), <strong>2<\/strong>\u00a0(&#8220;<strong>open<\/strong>&#8220;), <strong>4<\/strong>\u00a0(&#8220;<strong>opening<\/strong>&#8220;) or <strong>0<\/strong>\u00a0(&#8220;<strong>stopped<\/strong>&#8220;), which indicates the current status of the towing claw.\u00a0Note that the status shall be published in a constant frequency all the time.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Towing Claw Actuator Status Monitoring<\/h4>\n<p>Monitor the towing claw actuator status.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing claw linear actuator monitoring for AutoKrawler 1: <strong>\/ak1\/towing\/claw\/actuator<\/strong><\/li>\n<li>Towing claw linear actuator monitoring for AutoKrawler 2: <strong>\/ak2\/towing\/claw\/actuator<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<strong>uint16<\/strong>): the claw actuator status,\u00a0in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>,&#8230;, <strong>1023<\/strong>}, where the value indicates the magnitude of the claw linear actuator length.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Towing Claw Pressure Monitoring<\/h4>\n<p>Monitor the pressure applied to the claw.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing claw pressure monitoring for AutoKrawler 1: <strong>\/ak1\/towing\/claw\/pressure<\/strong><\/li>\n<li>Towing claw pressure monitoring for AutoKrawler 2: <strong>\/ak2\/towing\/claw\/pressure<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<strong>uint16<\/strong>): the magnitude of the pressure applied to the claw,\u00a0in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>,&#8230;, <strong>1023<\/strong>}, where the value indicates the magnitude of the pressure.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Towing APIs<\/h3>\n<h4>Towing Winch Control<\/h4>\n<p>Control the towing winch.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing winch control for AutoKrawler 1: <strong>\/ak1\/towing\/winch\/control<\/strong><\/li>\n<li>Towing winch control for AutoKrawler 2: <strong>\/ak2\/towing\/winch\/control<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<b>uint16<\/b>): can be either <strong>1<\/strong>\u00a0(&#8220;<strong>retract<\/strong>&#8220;), <strong>2<\/strong>\u00a0(&#8220;<strong>release<\/strong>&#8220;) or <strong>0<\/strong>\u00a0(&#8220;<strong>stop<\/strong>&#8220;), which indicates the desired status of the towing winch. Note that the control command shall be published in a constant frequency all the time, and any invalid value will be ignored.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Towing Claw Control<\/h4>\n<p>Control the towing claw.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing claw control for AutoKrawler 1: <strong>\/ak1\/towing\/claw\/control<\/strong><\/li>\n<li>Towing claw control for AutoKrawler 2: <strong>\/ak2\/towing\/claw\/control<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_message\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<b>uint16<\/b>): can be either <strong>1<\/strong>\u00a0(&#8220;<strong>close<\/strong>&#8220;), <strong>2<\/strong>\u00a0(&#8220;<strong>open<\/strong>&#8220;) or <strong>0<\/strong>\u00a0(&#8220;<strong>stop<\/strong>&#8220;), which indicates the desired status of the towing claw. Note that the control command shall be published in a constant frequency all the time, and any invalid value will be ignored.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><del>Winch Control<\/del>\u00a0<em>[Discarded]<\/em><\/h4>\n<p>Control the winch.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Winch control for AutoKrawler 1:\u00a0<strong>\/ak1\/servo<\/strong><\/li>\n<li>Winch control for AutoKrawler 2:\u00a0<strong>\/ak2\/servo<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/UInt16<\/strong>):\n<ul>\n<li><strong>data<\/strong>\u00a0(<b>uint16<\/b>): the velocity of the servo, from [1000, 2000]. 1500 is stopped.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Towing Arduino Serial (without ros_lib on Arduino)<\/h4>\n<p>Serial communication and protocols for the towing Arduino micro-controller.<\/p>\n<ul>\n<li>ROS Topic:\n<ul>\n<li>Towing Arduino serial receiving (from Arduino to ROS) for AutoKrawler 1: <strong>\/ak1\/towing\/serial\/receive<\/strong><\/li>\n<li>Towing Arduino serial receiving (from Arduino to ROS) for AutoKrawler 2: <strong>\/ak2\/towing\/serial\/receive<\/strong><\/li>\n<li>Towing Arduino serial sending (from ROS to Arduino) for AutoKrawler 1: <strong>\/ak1\/towing\/serial\/send<\/strong><\/li>\n<li>Towing Arduino serial sending (from ROS to Arduino) for AutoKrawler 2: <strong>\/ak1\/towing\/serial\/send<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Message Structure (<strong>std_msgs\/String<\/strong>):\n<ul>\n<li><strong>data<\/strong> (<strong>string<\/strong>): the serial message to receive or to send.<\/li>\n<\/ul>\n<\/li>\n<li>Protocols:\n<ul>\n<li>actuation command (to send):\n<ul>\n<li>format: <strong>w[Nwa] c[Nca]<\/strong>\n<ul>\n<li><strong>[Nwa]<\/strong>: the actuation command for the winch, in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>}, where\u00a0<strong>0<\/strong> indicates stopping the current action,\u00a0<strong>1<\/strong>\u00a0indicates retracting the tether, and <b>2<\/b>\u00a0indicates releasing the tether. Note that the actual actuation should align to the <span style=\"text-decoration: underline\">last valid partial command<\/span> sent, regardless of the current status.<\/li>\n<li><strong>[Nca]<\/strong>: the actuation command for (the linear actuator of) the claw, in {<strong>0<\/strong>, <strong>1<\/strong>,\u00a0<strong>2<\/strong>}, where\u00a0<strong>0<\/strong> indicates stopping the current action,\u00a0<b>1<\/b>\u00a0indicates closing the claw, and <b>2<\/b>\u00a0indicates opening the claw.\u00a0Note that the actual actuation should align to the <span style=\"text-decoration: underline\">last valid partial command<\/span> sent, regardless of the current status.<\/li>\n<\/ul>\n<\/li>\n<li>\u00a0examples:\n<ul>\n<li>&#8220;<strong><span style=\"text-decoration: underline\">w1<\/span>\u00a0<span style=\"text-decoration: underline\">c2<\/span><\/strong>&#8220;: make the winch tether retracted and the claw open.<\/li>\n<li>&#8220;<strong>w0 c1 <span style=\"text-decoration: underline\">c1<\/span>\u00a0w0 w1 w1 c4 c12313212 <span style=\"text-decoration: underline\">w1<\/span>\u00a0ccc1<\/strong>&#8220;: make the winch tether retracted and the claw closed.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>status feedback command (to receive):\n<ul>\n<li>format: <strong>w[Nws] c[Ncs] l[Nls] f[Nfs]<\/strong>\n<ul>\n<li><strong>[Nws]<\/strong>: the winch status feedback, in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>, <strong>3<\/strong>, <strong>4<\/strong>}, where <strong>0<\/strong> indicates the winch is stopped,\u00a0<b>1<\/b>\u00a0indicates the winch tether is fully retracted, <b>2<\/b>\u00a0indicates the winch tether is fully released (to its maximum length), <b>3<\/b>\u00a0indicates the winch tether is being retracted, and <b>4<\/b>\u00a0indicates the winch is being released.\u00a0Note that the <span style=\"text-decoration: underline\">last valid partial status feedback<\/span> received is considered, and the status feedback shall be sent by the Arduino in a constant frequency all the time.<\/li>\n<li><strong>[Ncs]<\/strong>: the claw status feedback, in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>, <strong>3<\/strong>, <strong>4<\/strong>},\u00a0where <strong>0<\/strong>\u00a0indicates the claw is stopped,\u00a0<b>1<\/b>\u00a0indicates the claw is fully closed, <b>2<\/b>\u00a0indicates the claw is fully open, <b>3<\/b>\u00a0indicates the claw is closing, and <b>4<\/b>\u00a0indicates the winch is opening.\u00a0Note that the <span style=\"text-decoration: underline\">last valid partial status feedback<\/span> received is considered, and the status feedback shall be sent by the Arduino in a constant frequency all the time.<\/li>\n<li><strong>[Nls]<\/strong>: the claw linear actuator status feedback, in {<strong>0<\/strong>, <strong>1<\/strong>, <strong>2<\/strong>,&#8230;, <strong>1023<\/strong>}, where the value indicates the magnitude of the claw linear actuator length.\u00a0Note that the <span style=\"text-decoration: underline\">last valid partial status feedback<\/span> received is considered, and the status feedback shall be sent by the Arduino in a constant frequency all the time.<\/li>\n<li><strong>[Nfs]<\/strong>: the force sensor (potentiometer) status feedback, in {<b>0<\/b>, <strong>2<\/strong>, <strong>3<\/strong>,&#8230;, <strong>1023<\/strong>}, where the value indicates the magnitude of the force sensed by the force sensor for the claw.\u00a0Note that the <span style=\"text-decoration: underline\">last valid partial status feedback<\/span> received is considered, and the status feedback shall be sent by the Arduino in a constant frequency all the time.<\/li>\n<\/ul>\n<\/li>\n<li>examples:\n<ul>\n<li>&#8220;<strong><span style=\"text-decoration: underline\">w1<\/span>\u00a0<span style=\"text-decoration: underline\">c3<\/span>\u00a0<span style=\"text-decoration: underline\">l156<\/span> <span style=\"text-decoration: underline\">f198<\/span><\/strong>&#8220;: the winch tether is fully retracted, the claw is closing, the claw linear actuator length magnitude is 156\/1024, and the force sensed for the claw has a magnitude of 198\/1024.<\/li>\n<li>&#8220;<strong><span style=\"text-decoration: underline\">w1<\/span>\u00a0cccccccc2 l9weqfa f199988888 w1.0 <span style=\"text-decoration: underline\">c1<\/span>\u00a0<span style=\"text-decoration: underline\">l55<\/span>\u00a0<span style=\"text-decoration: underline\">f25<\/span> fffff123<\/strong>&#8220;:\u00a0the winch tether is fully retracted, the claw is closed, the claw linear actuator has a length magnitude of 55\/1024, and the force sensed for the claw has a magnitude of 25\/1024.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overall ROS Architecture &nbsp; Pose Estimation APIs Here are some caveats for the IMU: the yaw of the IMU pose measurement will [&hellip;]<\/p>\n","protected":false},"author":118,"featured_media":0,"parent":41,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-441","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/pages\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/users\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/comments?post=441"}],"version-history":[{"count":63,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/pages\/441\/revisions"}],"predecessor-version":[{"id":722,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/pages\/441\/revisions\/722"}],"up":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/pages\/41"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2017teami\/wp-json\/wp\/v2\/media?parent=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}