Home | Tutorials | Wiki | Issues
Ask Your Question
2

Javascript/NodeJS Scripting of Gazebo (python also?)

asked 2016-06-03 09:04:55 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

This might be good for a FAQ: (at least for beginners here like me):

The tutorials list a number of ways JS/NodeJS programs can pub/sub to Gazebo. But it also hints at more API functions that can be reached: e.g Reading SDF model information:

http://gazebosim.org/tutorials?tut=ga...

What things that can normally only be done via C++ plugins can be also be done with JS?

  • Events subscription?
  • Implement a plugin (e.g. sensor) [probably not, since it needs to be an .so)
  • System, World, Object API?
  • Grabbing Sensor Rays (multiRays) and exploring intersections with world objects?

Same question for Python.

[I certainly realize the performance will not be the same as a in-process library written in C++, but for some use cases, this functionality will be fine and lead to faster prototyping]

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-06-13 02:32:39 -0600

reinzor gravatar image

The javascript client side library is able to use gazebo transport to send and receive the protobuf messages. So you could subscribe to messages and communicate with a (custom) plugin. You cannot directly use the C++ API's for sytem, world and objects. There should be something running within the simulator to modify the state.

If you would like to use python, take a look at this library: https://github.com/jpieper/pygazebo

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-06-03 09:04:55 -0600

Seen: 615 times

Last updated: Jun 03 '16