Skip to content

Using both position and velocity controller #69

@BCaran

Description

@BCaran

I have eight motors (Dynamixel XH430-W210-T), 4 for steering and 4 for driving mobile robot. I would like to control steering motor with position controller and driving motor with velocity controller...is this possible? I tried using JointGroupPositionController and JointGroupVelocityController and when I send [0, 0, 0, 0] to position controller, steering motors go to 0 position, but then I try to send [0.5, 0.5, 0.5, 0.5] to velocity controller and driving motors start driving a bit and then return to 0...does anyone know why is that..am I missing something?
I am using ROS2 Humble with ros2_controll, and my .yaml file is bellow:

controller_manager:
  ros__parameters:
    update_rate: 100  # Hz

    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster

    velocity_controller:
      type: velocity_controllers/JointGroupVelocityController

    position_controller:
      type: position_controllers/JointGroupPositionController

velocity_controller:
  ros__parameters:
    joints:
      - FL_wheel
      - BL_wheel
      - BR_wheel
      - FR_wheel

position_controller:
  ros__parameters:
    joints:
      - FL_steering
      - BL_steering
      - BR_steering
      - FR_steering

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions