0
$\begingroup$

Rosanswers logo

I am using the UR robot controlled by moveit. The real robot is on a stand and in Rviz the robot shows at the origin. How do I set the position of the robot to a certain coordinate so I can use collision detection?

I am able to do that in Gazebo but not in Rviz. Where would I set the position?

Should I have to put it as a part of URDF along with the robot? or is there a workaround as making the stand a an object in the collision detection?


Originally posted by Karthik_rangz on ROS Answers with karma: 21 on 2020-01-20

Post score: 0

$\endgroup$
1

3 Answers 3

0
$\begingroup$

Rosanswers logo

I found the answer! Just update the origin(xyz and rpy) in the urdf.xacro file of the robot to the position you want to.


Originally posted by Karthik_rangz with karma: 21 on 2020-01-20

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

This question would be much better if you added your actual URDF.

The robot does not have to be at the origin of your world. In general, you would add a link and joint to place the robot arm in your environment in the correct position. You would then add the rest of the environment objects in the appropriate place, also using links and joints.

And yes, you should add e. g. a box underneath the robot to represent your robot base, to avoid collisions with it.

Remember not to change your robot arm's URDF directly, because it is supplied by UR, but instead to use the macro to add the arm to your own URDF.


Originally posted by fvd with karma: 2180 on 2020-02-28

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

There is no concept of origin of Rviz, only origin of a certain frame in you tf system. To clarify the problem, you must state the frame of which you want to place you robot at the origin of. Suppose your scene frame is world, you can just write a static tf transformer to publish the tf from world to your base_link or something.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.