cmower / ros_pybullet_interface

ROS-PyBullet Interface.
https://github.com/ros-pybullet/ros_pybullet_interface
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Optionally make Pybullet simulation time as ROS time #125

Closed cmower closed 2 years ago

cmower commented 2 years ago

Allow user to sync ROS time with Pybullet simulation time. The crux here is that you must set the interface to step through pybullet manually since the simulation time is not currently exposed.

cmower commented 2 years ago

@christian-rauch I think this should implement your suggestion for syncing Pybullet time with ROS clock. Please merge unless you have any suggestions for improvement?

christian-rauch commented 2 years ago

Does this mean, there is no API to query the simulation time from PyBullet? But since you have to "advance" the simulation manually, you can just keep track of the number of iterations?

cmower commented 2 years ago

Yes, there is no pybullet.getSimulationTime method. Pybullet can either run on its own or by manually stepping time - by default we let it run on its own, but you can step through manually and in this mode optionally sync it with ROS time.