compas_rrc icon indicating copy to clipboard operation
compas_rrc copied to clipboard

rrc.MoveToJoints uses JointTrajectoryPoint

Open yck011522 opened this issue 3 years ago • 2 comments

Summary

As a user, I want to send compas_fab planned result directly via rrc so that I do not need to manually convert JointTrajectoryPoint to compas_rrc.RobotJoints/ExternalAxes.

Details

It might be similar to # 10 but it is slightly different. As a user of the RFL URDF, I get planner result sometimes in full configuration (4 robots + 10 external axis). It would be nice if the functions in rrc that consumes a compas.robots.Configuration can automatically take the relevant joint values. Because in practice I have different controllers managing 4 robots and they all consume part of this config.

full_config # type: compas.robots.JointTrajectoryPoint
robot_11.send(rrc.MoveToJoints.from_configuration(full_config))
robot_12.send(rrc.MoveToJoints.from_configuration(full_config))
robot_21.send(rrc.MoveToJoints.from_configuration(full_config))
robot_22.send(rrc.MoveToJoints.from_configuration(full_config))

yck011522 avatar Apr 01 '21 08:04 yck011522

I believe JointTrajectoryPoint has velocity information

yck011522 avatar Apr 01 '21 08:04 yck011522

Linked to #10

Good point.

Reducing the list of individual joint velocities in a JointTrajectory to a single tcp speed is something that the industrial robot client of ROS already does, and we could also bring in. I was never completely convinced with the resulting speeds thou but that might have been side effect of other parts of the system back then.

Since this reduction needs knowledge of the limits of the joints (hence of the whole robot model), it would need to be on compas_fab side, rather than here, but perhaps that is exactly the interplay between this issue and #10, eg:

ros = RosClient()
rfl = ros.load_robot()
robot_11 = AbbClient(robot.client, '/rob11')

# do some planning here and get a JointTrajectory object

full_config = joint_traj.points[0]

group_config = rfl.get_group_configuration('robot11_eaXYZ', full_config)     # this function already exist
robot_11.send(rrc.MoveToJoints.from_configuration(group_config))

``

gonzalocasas avatar Apr 01 '21 09:04 gonzalocasas