Universal Robots Forum

Discrepancy in frame of reference between Gazebo and URSim

I am developing an application to control the TCP using ROS. When I launch any UR robot model in Gazebo, it spawn with [0 0 0 0 0 0] joint configuration. Similarly, if I give exact same joint configuration to the URSim, the robot faces in the opposite direction in x axis. It seems the base has 180 offset when Gazebo and URSim reference frames are compared.

Due to this discrepancy, I am not able to use the same algorithm to control the TCP in Gazebo simulation and URSim. If I calculate joint configuration for a particular TCP pose and command robot in Gazebo and URSim, the resultant TCP position is totally different in both simulators. Apart from that the TCP position seen on URSim under the move tab (with Base feature selected) will also not match to desired TCP pose.

Is there a way to flip the robot in URSim ? I tried setting up the installation parameters in URSim but it will only change the visualization. In short I want the base feature in URSim to exactly match with frame of reference as Gazebo.

Attachments :

  1. Gazebo_default : Robot at [0 0 0 0 0 0] joint configuration

  1. URSim_default : Robot at [0 0 0 0 0 0] joint configuration

URSim_defualt

  1. Gazebo_pos : Robot at TCP [x y z Rx Ry Rz] = [0.4 0.6 0.6 -pi/2 0 -pi/2 ]

  1. URSim_pos : Robot at the same joint configuration as calculated for [x y z Rx Ry Rz] = [0.4 0.6 0.6 -pi/2 0 -pi/2 ]

URSIm_pos

Hi @dparikh,

The base frame in URSim matches the real robot (positive y axis aligned with cable coming out of robot base) and cannot be adjusted. Can you try to change your frame in Gazebo instead?

Thank you for the confirmation. I am now identifying the interface i.e. Gazebo or hardware / URSim , and modifying the control algorithm accordingly.