mit-aera / FlightGoggles

A framework for photorealistic hardware-in-the-loop agile flight simulation using Unity3D and ROS. Developed by MIT AERA group.
http://flightgoggles.mit.edu
Other
402 stars 99 forks source link

Pausing simulator #94

Closed Cpruce closed 5 years ago

Cpruce commented 5 years ago

Hi,

Is there a way to pause/unpause the simulator through ros? I see /uav/collision and /uav/input/reset are for reseting the simulator. I didn't see a topic to pause though. If one doesn't exist, do you have suggestions for adding that functionality?

Thanks, Cory

varunmurali1 commented 5 years ago

I am marking this as a feature request. However, it is unlikely we be providing this functionality soon. If you wish to implement this yourself, I would look at the way the simulationLoopTimer works in the [dynamics node] (https://github.com/mit-fast/FlightGoggles/blob/master/flightgoggles_uav_dynamics/src/flightgoggles_uav_dynamics_node.cpp). In theory, you could write a callback that stops this timer (on pause) and starts it on unpause. Note, this would only work in simulation time and you might have to edit the logic in line 230 of that file.

Winter-Guerra commented 5 years ago

Closing this issue, since this is a feature that we're unlikely to implement as part of the core FlightGoggles stack.