Skip to content

Camera control example

rethink-kmaroney edited this page May 31, 2013 · 10 revisions

Camera Control Example

Summary

Open, display and close each of the three available cameras (left_hand_camera, right_hand_camera, and head_camera) with various settings.

Quickstart

Close all currently open cameras from an RSDK terminal session, ex:

    $ rosrun input_output camera_control.py -c left_hand_camera
    $ rosrun input_output camera_control.py -c right_hand_camera
    $ rosrun input_output camera_control.py -c head_camera

Open the left_hand_camera at the maximum frame height and width, ex:

    $ rosrun input_output camera_control.py -o left_hand_camera -r 1280x800

View the camera feed, ex:

    $ rosrun image_view image_view image:=/cameras/left_hand_camera/image

The left_hand_camera will then be displayed using the image_view tool.

Overview

There are three cameras available local to Baxter. A single camera is located in either Baxter's hands, the 'left_hand_camera' and the 'right_hand_camera'. A third camera is available on Baxter's head, described as 'head_camera'. This example shows usage for listing available cameras, opening each of the three cameras with various parameters, and closing the cameras.

For more information on Baxter's cameras, see Using the Cameras.

Usage

See the camera controller's usage on the command line by passing camera_controller.py the -h, help argument:

    $ rosrun input_output camera_control.py -h

Usage:

trajectory_controller.py [-h] [-l LIMB]

Optional Arguments
-h, --help - Show this help message and exit
-l LIMB, --limb LIMB - trajectory controller limb [both | left | right].


See the trajectory test example's usage on the command line by passing trajectory_test.py the '-h', help argument:

    $ rosrun joint_trajectory trajectory_test.py -h

Usage:

trajectory_test.py [-h] -l LIMB

Required Arguments
-l LIMB, --limb LIMB - send joint trajectory to which limb [left | right]

Optional Arguments
-h, --help - Show this help message and exit

Interfaces

ROS APIs

See the API Reference page for details.

  • Joint Trajectory Action Server - /sdk/robot/limb/right/follow_joint_trajectory [control_msgs/FollowJointTrajectoryAction]
  • Joint Trajectory Action Server - /sdk/robot/limb/left/follow_joint_trajectory [control_msgs/FollowJointTrajectoryAction]

baxter_interface APIs

  • FJTAS class: fjtas.py

Troubleshooting

For common issues specific to using joint_trajectory example with Baxter, check out the Troubleshooting page.

Clone this wiki locally