The world frame in CoppeliaSim

Typically: "How do I... ", "How can I... " questions
Post Reply
SreejaVangapelli
Posts: 1
Joined: 23 Jun 2022, 23:51

The world frame in CoppeliaSim

Post by SreejaVangapelli »

I am newbie to coppeliaSim. I had a question regarding customizing the world frame. I have a mechanism whose world frame is different than that of the default world frame of coppelia. The z-axis is horizontal to the floor and y-axis is pointing upwards from the floor.

I was wondering if the default world frame on the software where the z-axis is pointing upwards from the floor can be switched with y-axis and can be changed according to my mechanism's world frame.

Please let me know. Thank you!

fferri
Posts: 1187
Joined: 09 Sep 2013, 19:28

Re: The world frame in CoppeliaSim

Post by fferri »

You can add a 'dummy' object in the scene with the desired orientation.

Then you would use its handle when you want to refer to "world" instead of -1, e.g. when passing the parameter relativeToObjectHandle to sim.getObjectPosition()

coppelia
Site Admin
Posts: 10312
Joined: 14 Dec 2012, 00:25

Re: The world frame in CoppeliaSim

Post by coppelia »

Correct. In general, you'll have to apply a specific transformation for the data coming in or imported (e.g. in your case this would be a simply rotation transformation \(R\)). When exporting data, you'd apply the inverse transformation, i.e. \(R^{-1}\)

Cheers

Post Reply