How to set the gravity using the setGravity() function before the robot break_release

we have an UR10e robot that is mounted with an angle of -90° around the x-axis.
we want to set the gravity direction directly after powering on the robot with the funtion SetGravity(), something like the following code :

self.PowerOnRobot()#
        # init clients
self.rtde_control = rtde_control.RTDEControlInterface(ip.value)
self.rtde_recive = rtde_receive.RTDEReceiveInterface(ip.value)
 self.rtde_io = rtde_io.RTDEIOInterface(ip.value)

# init gravity
self.rtde_control.setGravity(["our values"])

self.ReleaseBrakeRobot()

however we are facing this error:

RTDEControlInterface: Could not receive data from robot…

RTDEControlInterface Exception: available: Bad file descriptor

RTDEControlInterface Exception: write: Bad file descriptor

terminate called after throwing an instance of ‘std::runtime_error’

what(): RTDEControlInterface: Could not reconnect to robot…
is there a work around for this ?

Hi Amina.

I unfortunately do not think this is possible as the set_gravity call is a script call and therefore not callable before the robot has been turned on.

A work around would be to have different installations files with the mounts settings needed.
or auto generating a installian file with the right settings would also be possible.
then loading the installation file is possible through the dashboard client.

so you would start by loading the correct installation file and then proceed with your release break procedure.

Luckily the mount only needs to be approximately correct for the robot to allow it self to turn, you can then afterwards set the precise gravity using your original plan.

best regards CG1

Why not just configure an installation with the right settings to automatically be loaded when the robot boots? That would be much simpler that trying to update gravity settings remotely. Am I missing something?

2 Likes

thanks a lot ! however is it possible to upload these files directly from my pc ? from what i understood loading them through the dashboard client (using loadURP(“files_name”)) requires that the path sent to the dashboard server should always be local to the UR controller.

yes but our project requires that we don’t work with the teach pendant at the end . we want everything to be done through our software.

As i see it you have 2 options.

  1. simple create the wanted installation file, preferly overwriten the default.installion file, like mry suggest and then remove the teach pendant.

  2. the other would be to transfer the wanted installation (which could be created on another robot) using ssh, then use the dashboard client

but I might be confused? do the robot change mounting / gravity or didn’t you say it was fixed mounted at -90deg?
because then you would only have to setup a installations file once then call the dashboard client.

only in the cases where the mounting angle could change would you need something completly remote.

best regards CG1

2 Likes

thanks for the help! the thing is there is a possibility that the robot could be changed for whatever reason and we need to avoid the need to use the teach pendant in that case.

If you replace the robot controller, you will most likely reuse the SD memory card, and then all files (installation etc) will still be present on the robot.

If you’re in the rare case, that you must replace the controller and robot with a completely new robot and fresh installation of PolyScope, you will still have to access PolyScope and set up network settings, passwords etc. :slight_smile:

1 Like