Can we have a way to update the root location of RobotModelSee original GitHub issue
As a developer who have
ToolModel with multiple links and joints, I would like to be able to update the location of a that
ToolModel object and visualize it.
At the moment, There is no dedicated ToolModelArtist, I user RobotModelArtist to visualize my tool, as such I use
RobotModelArtist.update() to update the robot’s joint state. However, I cannot update the tool’s root’s location.
I needed this because I want to visualized my gripper tool at my target object and perform a collision check before attempting IK or Pathplan, therefore I do not have any robot attaching to that tool, and thus not able to use the
RobotModelArtist.update_tool() . It would be nice to have a function to set / update the root transformation (as described in the tutorial as Robot coordinate frame
RCF) of the robot, perhaps even keeping its state.
I have tried to use the
RobotArtistModel._update() which has a
parent_transformation input, but the result is not correct. The root of my ToolModel is not transformed, only the links are transformed.
from compas_ghpython.artists import RobotModelArtist t = Transformation.from_frame(tool_RCF_frame) artist = RobotModelArtist(tool_model) artist._update(tool_model, tool_model.current_configuration.joint_dict, parent_transformation = t) visual = artist.draw_visual() # The results are not correct
Notice my gripper fingers are in the transformed position, but the gripper body (root) is not.
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
@yck011522 ok, there’s quite a bit underlying this seemingly trivial request:
add_jointmethod, leading to the incorrect recalculation of the chain. This was fixed and merged yesterday. With that, you can move a robot model’s base with
model._create(model.root, your_desired_transformation)(however that this is still a private method)
fixedjoint between a non-geometry
worldlink (or name it whatever you want), and your
gripper_base. As far as I understand, this is the standard way most robots are defined in ROS (mobile robots introduce even more intermediate frames).
roslibpydoes, but we haven’t integrated it in
Based on that, I’m starting to fix this with this pull request which adds RCF setting for the model only (supporting both with or without a fixed frame in the URDF). If you have time to check this out and see if it works for you, it’d be appreciated.
Next, I will add one or two more pull requests to hook up that change into COMPAS FAB and have MoveIt reflect the change accordingly.
@gonzalocasas we are using ROS backends via Docker. Thanks!