ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You'll need to add a static transform between any frame on Baxter and openni_depth_frame. That will tell RViz (and all other ROS tools that use TF) how your camera is attached to the robot. You can invoke the static transform publisher through the commandline:

Usage: static_transform_publisher x y z qx qy qz qw frame_id child_frame_id 
OR 
Usage: static_transform_publisher x y z yaw pitch roll frame_id child_frame_id

for instance:

$ rosrun tf2_ros static_transform_publisher 0.15 0.075 0.5 0.0 0.7854 0.0 /head /openni_depth_frame

Or through a launch file named something like static_depth_tf.launch:

<launch>
     <!-- Users update this value to set transform between camera and robot -->  
     <arg name="camera_link_pose" default="0.15 0.075 0.5 0.0 0.7854 0.0"/>  
     <arg name="camera_link_name" default="/openni_depth_frame"/>  
     <arg name="robot_link_name" default="/head"/>  
     <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"  
               args="$(arg camera_link_pose) $(arg robot_link_name) $(camera_link_name) 100" />  
</launch>

And then invoke it with
$ roslaunch static_depth_tf.launch

You'll need to add a static transform between any frame on Baxter and openni_depth_frame. That will tell RViz (and all other ROS tools that use TF) how your camera is attached to the robot. You can invoke the static transform publisher through the commandline:

Usage: static_transform_publisher x y z qx qy qz qw frame_id child_frame_id 
OR 
Usage: static_transform_publisher x y z yaw pitch roll frame_id child_frame_id

for instance:

$ rosrun tf2_ros static_transform_publisher 0.15 0.075 0.5 0.0 0.7854 0.0 /head /openni_depth_frame

Or through a launch file named something like static_depth_tf.launch:

<launch>
     <!-- Users update this value to set transform between camera and robot -->  
     <arg name="camera_link_pose" default="0.15 0.075 0.5 0.0 0.7854 0.0"/>  
     <arg name="camera_link_name" default="/openni_depth_frame"/>  
     <arg name="robot_link_name" default="/head"/>  
     <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"  
               args="$(arg camera_link_pose) $(arg robot_link_name) $(camera_link_name) 100" />  
</launch>

And then invoke it with

$ roslaunch static_depth_tf.launch

You'll need to add a static transform between any frame on Baxter and openni_depth_frame. That will tell RViz (and all other ROS tools that use TF) how your camera is attached to the robot. You can invoke the static transform publisher through the commandline:

Usage: static_transform_publisher x y z qx qy qz qw frame_id child_frame_id 
OR 
Usage: static_transform_publisher x y z yaw pitch roll frame_id child_frame_id

for instance:

$ rosrun tf2_ros static_transform_publisher 0.15 0.075 0.5 0.0 0.7854 0.0 /head /openni_depth_frame

Or through a launch file named something like static_depth_tf.launch:

<launch>
     <!-- Users update this value to set transform between camera and robot -->  
     <arg name="camera_link_pose" default="0.15 0.075 0.5 0.0 0.7854 0.0"/>  
     <arg name="camera_link_name" default="/openni_depth_frame"/>  
     <arg name="robot_link_name" default="/head"/>  
     <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"  
               args="$(arg camera_link_pose) $(arg robot_link_name) $(camera_link_name) 100" $(camera_link_name)" />  
</launch>

And then invoke it with

$ roslaunch static_depth_tf.launch