Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.61 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.61 KB

Joint odometry

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.

Quick start

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

The qbo_joint_odom.py node

Publish a tf transform for the head.

Published transforms

base_frame_idhead_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.

Parameters

~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.)

Servo encoding

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.