Choosing robot to execute trajectory in StudioLive

💬 Open
Alban Laflaquiere

This might not be a bug, but rather an undocumented behavior.

When only a single robot in present in a Studio scene, playing a trajectory with studio.run_trajectory(trajectory) works as expected.
When more than one robot is present, one needs to specify the target robot with studio.run_trajectory(trajectory, robot=the_robot). However, I cannot manage to move the robot in Studio (nothing happens).

A little bit of context:

  • I pre-create the robots manually in Studio, because I couldn't find any method to do it using jacobi.Studio (something like a jacobi.Studio.add_robot(...))
  • It's then possible that "something" is played when I call studio.run_trajectory(trajectory, robot=the_robot), but simply not targeting any of the two robots I created manually

Could you please tell me how one is supposed to create/upload the robots to Studio Live and then to execute the trajectory on a specific robot?

Thanks

2 months ago

Activity
Lars Berscheid

Here is a video of two robots in Studio. This works on my side with the following snippet:

from jacobi import Planner, Studio
from jacobi.robots import UniversalUR5e, FrankaPanda

if __name__ == '__main__':
    ur = UniversalUR5e()
    ur.set_speed(0.1)
    ur.name = 'Universal UR5e'

    franka = FrankaPanda()
    franka.set_speed(0.1)
    franka.name = 'Franka Panda'

    planner_ur = Planner(ur)
    trajectory_ur = planner_ur.plan(
        [0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
        [0.5, 0.0, 0.0, 0.0, 0.0, 0.0],
    )

    planner_franka = Planner(franka)
    trajectory_franka = planner_franka.plan(
        [0.0, 0.0, 0.0, -1.5, 0.0, 1.5, 0.0],
        [0.5, 0.0, 0.0, -1.5, 0.0, 1.5, 0.0],
    )

    studio = Studio()
    studio.run_trajectory(trajectory_ur, robot=ur)
    studio.run_trajectory(trajectory_franka, robot=franka)

0    3 weeks ago    Reply

Alban Laflaquiere

This is what I was/am doing indeed.

I just tried once again today and, to my surprise, it is now working!
I'm pretty confident nothing changed in my code since I last tried, but I might be using a more recent version of the library compared to last time.
In any case, it seems that something has changed somewhere, but what matters is that it's now functional!

Thanks for the help.

1    2 weeks ago    Reply

Alban Laflaquiere

Hi Lars,
I tried to name my robots , but to no avail. I still have to select them in Studio to see the replay of a trajectory.

0    1 month ago    Reply

Yahav changed status to 💬 Open

1 month ago

Alban Laflaquiere

Thanks for your answer. I'll try once I'm back from vacation.

In the meantime, an additional question:
My understanding is that the robot needs to be created manually in Studio in order to be controlled via Studio Live. Is that correct or is there a way to upload a robot with something like studio.add_robot(my_robot)?

0    2 months ago    Reply

Lars Berscheid

Thanks for the detailed description!

Can you set the name of the robot in Python via the_robot.name = "..." to the same name of the robot you want to control in Studio? In general, we're using an object's name to match them between the code and Studio.

0    2 months ago    Reply

Alban Laflaquiere

Additional info: it is possible to move an arbitrary robot by selecting it in Studio before calling studio.run_trajectory(trajectory) (without specifying any robot argument in the call).

1    2 months ago    Reply

Lars Berscheid

Yes, we have the concept of an active robot, and if no robot is specified we fall back to the last active one.

0    2 months ago    Reply

One vote