Closed adkoessler closed 1 year ago
I assume that running two drivers on one machine / network interface could be too much, but that's just a very brief assumtion.
However, if you want to use truely synchronized motions, I suggest you use a combined_robot_hw approach where both robots will be inside the same hardware interface for that. This driver's hardware interface should be equipped to allow using this rather easily. As you obviously are aware of avoiding joint name collisions this should be rather quick to setup.
Thank you @fmauch and sorry for the late reply.
I am trying to follow the combined_robot_hw tutorial, but creating a 'ur_robot_driver/config/combo_ur10e_controllers.yaml` file for controllers raises two questions:
1) In two following piece of code, how can it be ensured that left_joint_state_controller
, left_force_torque_sensor_controller
and left_speed_scaling_state_controller
really point towards &left_robot_joints
?
comboRobot:
# Settings for ros_control control loop
hardware_control_loop:
loop_hz: &loop_hz 500
leftRobot:
# Settings for ros_control hardware interface
ur_hardware_interface:
joints: &left_robot_joints
- left_arm_shoulder_pan_joint
- left_arm_shoulder_lift_joint
- left_arm_elbow_joint
- left_arm_wrist_1_joint
- left_arm_wrist_2_joint
- left_arm_wrist_3_joint
rightRobot:
# Settings for ros_control hardware interface
ur_hardware_interface:
joints: &right_robot_joints
- right_arm_shoulder_pan_joint
- right_arm_shoulder_lift_joint
- right_arm_elbow_joint
- right_arm_wrist_1_joint
- right_arm_wrist_2_joint
- right_arm_wrist_3_joint
controller:
# Publish all joint states ----------------------------------
left_joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: *loop_hz
# Publish wrench ----------------------------------
left_force_torque_sensor_controller:
type: force_torque_sensor_controller/ForceTorqueSensorController
publish_rate: *loop_hz
# Publish speed_scaling factor
left_speed_scaling_state_controller:
type: scaled_controllers/SpeedScalingStateController
publish_rate: *loop_hz
# Publish all joint states ----------------------------------
right_joint_state_controller:
type: joint_state_controller/JointStateController
publish_rate: *loop_hz
# Publish wrench ----------------------------------
right_force_torque_sensor_controller:
type: force_torque_sensor_controller/ForceTorqueSensorController
publish_rate: *loop_hz
# Publish speed_scaling factor
right_speed_scaling_state_controller:
type: scaled_controllers/SpeedScalingStateController
publish_rate: *loop_hz
2) In the case of controllers for Cartesian pose and twist, how should parameters of the combined versions be defined? Is it even possible to have combined versions for such controllers? For instance with the joint_based_cartesian_traj_controller
, setting up parameters base
and tip
is not obvious when dealing with two robots.
Best, Adrien
As for your first question: That is indeed something I did not think of. You will, most probably, get an error on startup as you try to register the "speed_scaling_factor" twice. Apart from this, a question would be what would actually be the desired behavior. In my opinion it would not make much sense to have different speed scaling values at all, as this would be going against the desired behavior of a synchronized motion. Sorry that I set you on a path not leading towards your desired goal. You could play around by adding the tf_prefix
to the handle's name to avoid the name collision, but I am still not sure about the behavior.
Regarding your second question: No, this is not possible. The Cartesian controllers are designed to move one frame through space. You might be able to workaround this using a virtual frame attached with a joint to both TCPs in the URDF, but I am not sure whether this will actually work...
Edit: For modifying the handle's name, you could also try #544
This issue has not been updated for a long time. If no further updates are added, this will be closed automatically. Comment on the issue to prevent automatic closing.
This issue has been closed due to inactivity. Feel free to comment or reopen if this is still relevant.
Summary
I use a single computer to control two UR arms for synchronized motions. When calling the action server to execute a FollowCartesianTrajectoryAction on both robots, random outcomes appear: both robots stay still, only one moves while the other stays still, or both move.
Versions
Impact
It is not possible to reliably execute synchronized motions (eg. for bi-arm manipulation)
Issue details
I am using a Python script inspired by
test_move.py
, where two FollowCartesianTrajectoryAction are instantiated in order to execute a coordinated motion:Launchfiles for both robots are namespaced and included in a single custom launchfile. After launching, the terminal looks like this:
In another terminal, services are called to use the
joint_based_cartesian_traj_controller
on both arms:The script is executed in a 3rd terminal:
However, the robots have not moved and the terminal where the driver nodes run displays:
Important remarks:
twist_controller
in the past. TF prefixes are used and joints have been renamed to differentiate between both arms.test_move.py
seems to work flawlessly on each robot independentlyUse case
Please see video: https://www.youtube.com/watch?v=V6lFX4VA86Y
Expected Behavior
Each robot should performed the intended trajectory once the goal is sent by the action client.
Actual Behavior
Sometimes both arms execute the trajectory, sometimes one does while the other stands still, sometimes both stand still.