ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You could probably have some sort of callback that sees your object pose, and using something like elementTree to turn that into a xacro block, and use this to generate your new urdf and publish this onto your /robot_description
topic. However, this would __most likely__ cause more problems than solutions. One problem that would spring to mind is that your robot's planner would immediately start complaining, both about the robot itself changing, and the fact that now you would essentially be in a state of collision - because the end-effector _(which is now your end effector + object in grasp)_ would be at the same point as the object itself.
I would highly suggest against this, instead try to see how MoveIt does it with their grasping tutorial here.
2 | No.2 Revision |
You could probably have some sort of callback that sees your object pose, and using something like elementTree to turn that into a xacro block, and use this to generate your new urdf and publish this onto your /robot_description
topic. However, this would __most likely__ most likely cause more problems than solutions. One problem that would spring to mind is that your robot's planner would immediately start complaining, both about the robot itself changing, and the fact that now you would essentially be in a state of collision - because the end-effector _(which is now your end effector + object in grasp)_ would be at the same point as the object itself.
I would highly suggest against this, instead try to see how MoveIt does it with their grasping tutorial here.