How to move a robot using regular API?

Typically: "How do I... ", "How can I... " questions
Post Reply
suri
Posts: 35
Joined: 07 Apr 2020, 17:24

How to move a robot using regular API?

Post by suri »

Hallo Admin,


I need to move the robot using regular API(currently using sim.setObjectPosition, if any other options is there kindly let me know). When I tried to set the position of robot during simulation on, robot breaks apart.

Code: Select all

RoboHandle = sim.getObjectHandle("kira_b50")
sim.setObjectPosition(RoboHandle,-1,{1,1,0})

When I use the above code, robot breaks apart. I tested the same code for KUKA YouBot robot, same thing happened.

How can I move my robot using regular API without breaking it?

I went through design consideration for dynamic simulation. I didn't find any error in the robot design(which are critical ).

https://www.coppeliarobotics.com/helpFi ... ations.htm.

Kindly have a look into my robot design consideration and breaking of robot when moving using regular API.


https://drive.google.com/file/d/1s4zgrv ... sp=sharing

https://drive.google.com/file/d/1ZZxv3I ... sp=sharing

Currently kira_b50 is a base model. I set the robot_base(convex shape) as a model, it works without ros velocity command, but not with ros velocity command.

I need to make base_ref(dummy) as a base of model and also I need to move the robot using setObjectPosition without breaking robot.

Hope for a hint or suggestion.

Thanks in advance.

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

Re: How to move a robot using regular API?

Post by coppelia »

Hello,

if your robot is dynamically enabled, i.e. has a mass, will fall, etc., then you can't instantaneously change its position. It would be like teleportation in real life. You need to drive to robot towards the position you wish, via a controller that actuates the wheels of the robot.
Of course, if you need to reset your robot, that's another story, but I guess that's not what you want to do.

Cheers

suri
Posts: 35
Joined: 07 Apr 2020, 17:24

Re: How to move a robot using regular API?

Post by suri »

Hello Admin,

If you don't mind, may I know another way as you mentioned in your last comment?
Of course, if you need to reset your robot, that's another story, but I guess that's not what you want to do.
Thanks in advance


Post Reply