open_manipulator_x_teleop

This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.

Node Name

keyboard_controller

Description

Keyboard teleoperation node for controlling the OpenManipulator-X robot arm with 4 joints and a gripper. The node provides real-time keyboard control to adjust individual joint positions and gripper state through interactive terminal input.

Publishers

  • Topic: /arm_controller/joint_trajectory

    • Type: trajectory_msgs/msg/JointTrajectory

    • Description: Publishes joint trajectory commands for the robot arm with 4 joints (joint1-joint4).

Subscribers

  • Topic: /joint_states

    • Type: sensor_msgs/msg/JointState

    • Description: Subscribes to current joint states to track arm positions and gripper position.

Actions (Client)

  • Action: /gripper_controller/gripper_cmd

    • Type: control_msgs/action/GripperCommand

    • Description: Sends gripper position commands with maximum effort of 10.0 N.

Parameters

This node does not expose configurable parameters. The following internal constants control behavior:

  • max_delta: 0.02 radians - Maximum position change per command for arm joints

  • gripper_delta: 0.002 meters - Position change increment for gripper

  • command_interval: 0.02 seconds - Minimum time between commands

  • gripper_max: 0.019 meters - Maximum gripper opening position

  • gripper_min: -0.01 meters - Minimum gripper opening position

Example Usage

Launch the node

ros2 run open_manipulator_teleop open_manipulator_x_teleop

Keyboard controls

Once running, use the following keys to control the robot:

  • 1/q: Increase/decrease joint1 position (±0.02 rad, range: -3.14 to 3.14)

  • 2/w: Increase/decrease joint2 position (±0.02 rad, range: -1.5 to 1.5)

  • 3/e: Increase/decrease joint3 position (±0.02 rad, range: -1.5 to 1.5)

  • 4/r: Increase/decrease joint4 position (±0.02 rad, range: -1.5 to 1.5)

  • o: Open gripper (increase position)

  • p: Close gripper (decrease position)

  • ESC: Exit the program

Example workflow

# Start the robot hardware or simulation first
ros2 launch open_manipulator_bringup open_manipulator_x.launch.py

# In a new terminal, run the teleop node
ros2 run open_manipulator_teleop open_manipulator_x_teleop

# Wait for "Ready to receive keyboard input!" message
# Use keyboard keys to control joints and gripper
# Press ESC to exit cleanly

Monitor joint commands

# In another terminal, monitor the published trajectories
ros2 topic echo /arm_controller/joint_trajectory