7. Interfaces

7.1. ROS2 Topics

7.1.1. force_setpoint

Set the requested torque setpoint of the motor.

  • Source type: SUBSCRIBER

  • Message type: std_msgs/msg/Float32

  • msg.data = Cart applied linear force [N]

  • QOS: rcl::SensorDataQoS

  • Frequency : TBD

7.1.2. pendulum_state

Publishes the current pendulum angular position and angular velocity.

  • Source type: PUBLISHER

  • Message type: geometry_msgs/msg/Vector3

  • msg.x = pendulum angular position [rad]

  • msg.y = pendulum angular velocity [rad/s]

  • msg.z = Not in use [-]

  • QOS: rcl::SensorDataQoS

  • Frequency: 50[Hz] - Period: 20[ms]

7.1.3. cart_state

Publishes the current cart position from center.

  • Source type: PUBLISHER

  • Message type: geometry_msgs/msg/Vector3

  • msg.x = cart position [m]

  • msg.y = cart velocity [m/s]

  • msg.z = Not in use [-]

  • QOS: rcl::SensorDataQoS

  • Frequency: 100[Hz] - Period: 10[ms]

7.1.4. status_cart

Publishes the current status of the cart.

  • Source type: PUBLISHER

  • msg.data = cart state [-]
    • 0 = CONFIGURED

    • 1 = ACTIVE

    • 2 = HEARTBEAT_ERROR

  • Message type: std_msgs/msg/UInt8

  • QOS: status_qos

    self.status_qos = qos.QoSProfile(depth=1,
                                     reliability=qos.QoSReliabilityPolicy.RELIABLE,
                                     history=qos.QoSHistoryPolicy.KEEP_LAST,
                                     durability=qos.QoSDurabilityPolicy.TRANSIENT_LOCAL)
    
  • Frequency: Only published on change, changed at 100[Hz]