Hello everyone,
I am trying to implement a multi-joint effort-position/velocity controller (not Trajectory Controller). I tried to copy the structure of a Joint-Trajectory controller, since I observed that the trajectory controller accepts an array of inputs for each time-step.
The reason I am attempting this is because I want to avoid any sources of delays in sending out commands to the joints when I want them all to move according to a sequence given to it by a black-box function. Since the physical-robot publishes commands to the motor over an n-size array for n-dof, I felt it might be nice to attempt it.
My Yaml-file is as such:
# https://github.com/ros-industrial/ur_modern_driver/issues/305
ros_control_namespace: "/"
# MoveIt-specific simulation settings
# Settings for ros_control control loop
generic_hw_control_loop:
loop_hz: 200
cycle_time_error_threshold: 0.01
# Settings for ros_control hardware interface
hardware_interface:
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
controller_list:
- name: eff_based_pos_traj_controller
action_ns: wam_follow_joint_trajectory
default: True
type: FollowJointTrajectory
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
- name: eff_based_pos_controller
action_ns: wam_follow_joint_pos
default: True
type: std_msgs/Float64
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
- name: eff_based_vel_controller
action_ns: wam_follow_joint_vel
default: True
type: std_msgs/Float64
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
# Reference values
# https://git.barrett.com/software/libbarrett_ros/blob/ros_control/config/wam_config.yaml
eff_based_pos_traj_controller:
type: effort_controllers/JointTrajectoryController
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
constraints:
goal_time: 1000
stopped_velocity_tolerance: 0.05
wam/J1: {trajectory: 0.1, goal: 0.1}
wam/J2: {trajectory: 0.1, goal: 0.1}
wam/J3: {trajectory: 0.1, goal: 0.1}
wam/J4: {trajectory: 0.1, goal: 0.1}
wam/J5: {trajectory: 0.1, goal: 0.1}
wam/J6: {trajectory: 0.1, goal: 0.1}
wam/J7: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 200
action_monitor_rate: 200
gains:
wam/J1:
p: 900
d: 10
i: 2.5
i_clamp: 0
wam/J2:
p: 2500
d: 20
i: 5
i_clamp: 0
wam/J3:
p: 600
d: 5
i: 2
i_clamp: 0
wam/J4:
p: 300
d: 2
i: 0.5
i_clamp: 0
wam/J5:
p: 50
d: 0.5
i: 0.5
i_clamp: 0
wam/J6:
p: 50
d: 0.5
i: 0.5
i_clamp: 0
wam/J7:
p: 8
d: 0.05
i: 0.1
i_clamp: 0
eff_based_pos_controller:
# Reference values
# https://git.barrett.com/software/libbarrett_ros/blob/ros_control/config/wam_config.yaml
# https://github.com/ros-industrial-attic/ur_modern_driver/issues/305
# Position Controllers ---------------------------------------
type: effort_controllers/JointPositionController
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
constraints:
goal_time: 1000
stopped_velocity_tolerance: 0.05
wam/J1: {goal: 0.1}
wam/J2: {goal: 0.1}
wam/J3: {goal: 0.1}
wam/J4: {goal: 0.1}
wam/J5: {goal: 0.1}
wam/J6: {goal: 0.1}
wam/J7: {goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 200
action_monitor_rate: 200
gains:
wam/J1:
p: 900
d: 10
i: 2.5
i_clamp: 0
wam/J2:
p: 2500
d: 20
i: 5
i_clamp: 0
wam/J3:
p: 600
d: 5
i: 2
i_clamp: 0
wam/J4:
p: 300
d: 2
i: 0.5
i_clamp: 0
wam/J5:
p: 50
d: 0.5
i: 0.5
i_clamp: 0
wam/J6:
p: 50
d: 0.5
i: 0.5
i_clamp: 0
wam/J7:
p: 8
d: 0.05
i: 0.1
i_clamp: 0
eff_based_vel_controller:
# Reference values
# https://git.barrett.com/software/libbarrett_ros/blob/ros_control/config/wam_config.yaml
# Velocity Controllers ---------------------------------------
type: effort_controllers/JointVelocityController
joints:
- wam/J1
- wam/J2
- wam/J3
- wam/J4
- wam/J5
- wam/J6
- wam/J7
constraints:
goal_time: 1000
stopped_velocity_tolerance: 0.05
wam/J1: {goal: 0.1}
wam/J2: {goal: 0.1}
wam/J3: {goal: 0.1}
wam/J4: {goal: 0.1}
wam/J5: {goal: 0.1}
wam/J6: {goal: 0.1}
wam/J7: {goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 200
action_monitor_rate: 200
gains:
wam/J1:
p: 42
d: 0
i: 0
i_clamp: 0
wam/J2:
p: 42
d: 0
i: 0
i_clamp: 0
wam/J3:
p: 18
d: 0
i: 0
i_clamp: 0
wam/J4:
p: 18
d: 0
i: 0
i_clamp: 0
wam/J5:
p: 3
d: 0
i: 0
i_clamp: 0
wam/J6:
p: 3
d: 0
i: 0
i_clamp: 0
wam/J7:
p: 3
d: 0
i: 0.1
i_clamp: 0
Any feedback would be most appreciated.