question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can we have a way to update the root location of RobotModel

See original GitHub issue

Feature Request

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

2020-11-07 21_32_44 Notice my gripper fingers are in the transformed position, but the gripper body (root) is not.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
gonzalocasascommented, Feb 2, 2021

@yck011522 ok, there’s quite a bit underlying this seemingly trivial request:

  1. There was a bug in the add_joint method, 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)
  2. However, the “proper” way to do this (according to the URDF gods), is to add a fixed joint between a non-geometry world link (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).
  3. But if you use MoveIt, things get a bit more complicated. MoveIt does not really allow URDF to change dynamically, it lets you define “virtual joints” at the SRDF level and changes to the position of those need to be manipulated via the TF tree (or some static transform publisher), which we currently don’t really support (roslibpy does, but we haven’t integrated it in compas/compas_fab).

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.

0reactions
laurendcommented, Apr 15, 2021

@gonzalocasas we are using ROS backends via Docker. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rviz urdf robot update position - ROS Answers
What I would like is to just reset the default position of the table, which is a RobotModel. An alternative method would be...
Read more >
Updating a Robot model - Revit - Autodesk Knowledge Network
Updating a Robot model · Click the Not assigned button located in the right-hand side of the profile, which was not recognized. ·...
Read more >
Reload robot model (e.g. during calibration) · Issue #29 - GitHub
Any new node can come up to speed (and stay updated) by listening to the same /robot/urdf topic, then building onto the URDF...
Read more >
Simox / Wiki / RobotModels - SourceForge
Later more complex examples are given, where you can see how advanced robot definitions ... <Robot Type="DemoRobot" RootNode="root"> <RobotNode name="root"> ...
Read more >
rviz/DisplayTypes/RobotModel
Update Rate. The rate at which to update the pose of each link, in seconds. Setting this to a small value will have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found