Skip to content

Robot Driver Node

alexanderdu15 edited this page Dec 17, 2024 · 4 revisions

RobotDriverNode is a ROS 2 node that serves as a communication interface between MPCGPU and robot hardware. It manages real-time trajectory execution while maintaining bidirectional communication with an Indy7 robotic arm.

This node has two primary responsibilities:

  1. Execute incoming joint trajectories with precise timing
  2. Poll and publish real-time joint states from the robot

Communication Interfaces

Subscriptions

  • Topic: joint_trajectory
  • Message Type: indy7_msgs/msg/JointTrajectory
  • Purpose: Receives planned joint trajectories for execution

Publications

  • Topic: joint_states
  • Message Type: indy7_msgs/msg/JointState
  • Purpose: Broadcasts current robot joint states at 1kHz

Key Features

  • 1kHz control loop for both state publishing and trajectory execution
  • Mutex-based thread protection for trajectory updates
  • Buffers incoming trajectories and executes them based on timing
  • Automatically handles trajectory completion and state transitions

Configuration

  • Robot IP address
  • Communication rates