ROS /
ScarabsPoseDatatypeIntroductionScarab publishes its current position and subscribes to waypoints formatted according to the ROS geometry_msgs/Pose datatype. This is of the form: { position: {x: .., y:.., z:..} orientation: {w:.., x:.., y:.., z..} } Any pose data you send to the /goal topic, must be formatted according as above. The HFN package in the Scarab will then interpret it as documented below. PositionThere are Cartesian x, y, z coordinates. z should always be set to 0, since Scarab is just a humble ground robot. OrientationThis is in quaternion form.
A quaternion takes a rotation axis in a unit vector form,
vx, vy, vz, a rotation angle, theta, and represents it as: Note that (vx, vy, vz) must be a unit vector. Since Scarab is just a humble ground robot, its orientation vector always has x and y set to 0. This means its rotation axis, in cartesian form, is When publishing an orientation to Scarab, if you want it to face an angle theta from the x-axis just set the quartenion orientation to: These are a few examples, with theta being desired rotation from x-axis in radians, and (w, x, y, z) being the quartenion orientation:
If you publish the a quaternion orientation of: Scarab will ignore the w expression, assume vz= 1, and derive the angle theta from the z expression: See Also |