kurshakuz
kurshakuz

Reputation: 31

Remote object creation in Webots

I have a robot that is remotely controlled by ROS (python) in Webots (it is using ros_automobile controller). All I want to do right now is to create (render) object remotely given location and orientation of object in my python code. For example, some kind of sign to show where my robot will have to go.

I'm able to give and process that information to my robot through services but have no clue how to send it to global Webots world and how to construct it without using GUI directly.

Upvotes: 2

Views: 193

Answers (1)

David Mansolino
David Mansolino

Reputation: 1733

What you are looking for are the supervisor services: https://www.cyberbotics.com/doc/reference/supervisor?tab=ros#supervisor-functions. With these services, you can import/remove/move/modify nodes in the scene.

You can find an example of this here: https://cyberbotics.com/doc/guide/samples-howto#supervisor_draw_trail-wbt It is written using the Webots C API but you can do something very similar using the ROS and Python.

Upvotes: 1

Related Questions