Subscribe to Q.bo joint sensor messages and publish tf frames for join pose and position. Specifically, head pan and tilt messages are converted.
This requires your Q.bo be launched with the dynamixelservo
support.
A launch file is provided which sets up a base_link
frame for the robot and
runs the joint odometry node. This is useful to testing but in production
you'll probably have a different solution for setting up the base_link
frame.
$ roslaunch qbo_joint_odom joint_odom_with_base_link.launch
Publish a tf transform for the head.
base_frame_id → head_frame_id: a frame for the head. The x-axis points out through the nose and the y-axis points out through the side of the head.
~head_frame_id (string, default: 'head'): frame id to publish head pose to.
~base_frame_id (string, default: 'base_link'): parent frame id of head pose.
~head_offset (float[3], default: [0,0,0.3]): the offset from base_frame_id to the head pivot point.
~head_pan_joint/topic (string, default: '/qbo_arduqbo/head_pan_joint/state'): topic to subscribe to to get updates on head pan. Expects a qbo\arduqbo::motor_state message.
~head_pan_joint/servo_ns (string, default: '/qbo_arduqbo/dynamixelservo/head_pan_joint'): base namespace for parameters specifying joint position encoding for the pan joint. (See servo encoding below.)
~head_tilt_joint/topic (string, default: '/qbo_arduqbo/head_tilt_joint/state'): topic to subscribe to to get updates on head tilt. Expects a qbo\arduqbo::motor_state message.
~head_tilt_joint/servo_ns (string, default: '/qbo_arduqbo/dynamixelservo/head_tilt_joint'): base namespace for parameters specifying joint position encoding for the tilt joint. (See servo encoding below.)
The node will attempt to configure the mapping from servo encoding values to
actual degrees via the same ROS parameters which are used to configure the
qbo_arduqbo
node itself. Specifically for each servo, the following
parameters are queried:
- servo_ns/invert: boolean indicating if the angle of the servo is inverted with respect to the encoder value.
- servo_ns/neutral: the encoded value when the servo is at the neutral, or central, position.
- servo_ns/ticks: the range of the servo in encoder values.
- servo_ns/range: the range of the servo in degrees.
For the head pan and tilt servos, servo\ns is replaced as appropriate by the values of the ~head_pan_joint/servo_ns and ~head_tilt_joint/servo_ns parameters.