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
400 stars 99 forks source link

Neither Keyboard Nor XBOX Controller Responding #25

Closed BhavyanshM closed 5 years ago

BhavyanshM commented 5 years ago

In the Teleop mode, even with the keyboard window open and spacebar long pressed, the drone does not move. Same with the Xbox One S controller.

Winter-Guerra commented 5 years ago

Hi there, have you tried increasing the throttle using the keyboard (Spacebar + W)? The drone will not respond to commands until extra throttle is applied. You also must make sure to have the keyboard control window selected before pressing any keys (see readme for a picture of the keyboard control window).

On Fri, Feb 8, 2019, 23:18 Bhavyansh Mishra notifications@github.com wrote:

In the Teleop mode, even with the keyboard window open and spacebar long pressed, the drone does not move. Same with the Xbox One S controller.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mit-fast/FlightGoggles/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwrnPJ16zOMEX43aJTo5ZARMJrrmFYks5vLkv3gaJpZM4ayXvR .

BhavyanshM commented 5 years ago

Hi there, have you tried increasing the throttle using the keyboard (Spacebar + W)? The drone will not respond to commands until extra throttle is applied. You also must make sure to have the keyboard control window selected before pressing any keys (see readme for a picture of the keyboard control window). On Fri, Feb 8, 2019, 23:18 Bhavyansh Mishra @.***> wrote: In the Teleop mode, even with the keyboard window open and spacebar long pressed, the drone does not move. Same with the Xbox One S controller. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#25>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwrnPJ16zOMEX43aJTo5ZARMJrrmFYks5vLkv3gaJpZM4ayXvR .

Oh I see. The problem is that since it has been running so slow, I had to long press Spacebar + W to see the effect. The drone is only somewhat controllable at that latency. How could it be that slow on Ryzen 7 2700x with GTX 1080 Ti? Anyhow, the Xbox controller does not respond at all.

BhavyanshM commented 5 years ago

Hi there, have you tried increasing the throttle using the keyboard (Spacebar + W)? The drone will not respond to commands until extra throttle is applied. You also must make sure to have the keyboard control window selected before pressing any keys (see readme for a picture of the keyboard control window). On Fri, Feb 8, 2019, 23:18 Bhavyansh Mishra @.***> wrote: In the Teleop mode, even with the keyboard window open and spacebar long pressed, the drone does not move. Same with the Xbox One S controller. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#25>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwrnPJ16zOMEX43aJTo5ZARMJrrmFYks5vLkv3gaJpZM4ayXvR .

Oh I see. The problem is that since it has been running so slow, I had to long press Spacebar + W to see the effect. The drone is only somewhat controllable at that latency. How could it be that slow on Ryzen 7 2700x with GTX 1080 Ti? Anyhow, the Xbox controller does not respond at all.

Is there anyway to reduce the quality to improve speed of simulation? Doesn't feel like a racing drone at all at the moment.

BhavyanshM commented 5 years ago

Hi there, have you tried increasing the throttle using the keyboard (Spacebar + W)? The drone will not respond to commands until extra throttle is applied. You also must make sure to have the keyboard control window selected before pressing any keys (see readme for a picture of the keyboard control window). On Fri, Feb 8, 2019, 23:18 Bhavyansh Mishra @.***> wrote: In the Teleop mode, even with the keyboard window open and spacebar long pressed, the drone does not move. Same with the Xbox One S controller. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#25>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwrnPJ16zOMEX43aJTo5ZARMJrrmFYks5vLkv3gaJpZM4ayXvR .

Oh I see. The problem is that since it has been running so slow, I had to long press Spacebar + W to see the effect. The drone is only somewhat controllable at that latency. How could it be that slow on Ryzen 7 2700x with GTX 1080 Ti? Anyhow, the Xbox controller does not respond at all.

Is there anyway to reduce the quality to improve speed of simulation? Doesn't feel like a racing drone at all at the moment.

Winter-Guerra commented 5 years ago

Try doing a pull and run it again. I think that your teleop was running at a sub realtime rate. I turned on realtime simulation rate forcing in the teleop config.

BhavyanshM commented 5 years ago

Try doing a pull and run it again. I think that your teleop was running at a sub realtime rate. I turned on realtime simulation rate forcing in the teleop config.

The yaw, pitch and roll responses are now more realtime, but the throttle and gravity feel really unnatural. Also, is the Xbox controller not supported?

Winter-Guerra commented 5 years ago

Keyboard control for throttle is not great because drones are not meant to be controlled via keyboard. It feels a LOT better with joypad. Keyboard and joypad are only meant for debugging, since this is an autonomous drone challenge.

Xbox controller could work, but would need some button/axis remaps. Take a look at the universal_teleop node and the different possible launch configs.

We only support one controller type out of the box (Logitech F310) for the moment. Might add Xbox in the future if there are enough requests. Perhaps make a feature request GitHub issue or a pull request?

On Sat, Feb 9, 2019, 00:08 Bhavyansh Mishra notifications@github.com wrote:

Try doing a pull and run it again. I think that your teleop was running at a sub realtime rate. I turned on realtime simulation rate forcing in the teleop config.

The yaw, pitch and roll responses are now more realtime, but the throttle and gravity feel really unnatural. Also, is the Xbox controller not supported?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mit-fast/FlightGoggles/issues/25#issuecomment-462014408, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwroGZujdpihg7vwbIvglSesU97Y4yks5vLlfBgaJpZM4ayXvR .

BhavyanshM commented 5 years ago

Keyboard control for throttle is not great because drones are not meant to be controlled via keyboard. It feels a LOT better with joypad. Keyboard and joypad are only meant for debugging, since this is an autonomous drone challenge. Xbox controller could work, but would need some button/axis remaps. Take a look at the universal_teleop node and the different possible launch configs. We only support one controller type out of the box (Logitech F310) for the moment. Might add Xbox in the future if there are enough requests. Perhaps make a feature request GitHub issue or a pull request? On Sat, Feb 9, 2019, 00:08 Bhavyansh Mishra @.***> wrote: Try doing a pull and run it again. I think that your teleop was running at a sub realtime rate. I turned on realtime simulation rate forcing in the teleop config. The yaw, pitch and roll responses are now more realtime, but the throttle and gravity feel really unnatural. Also, is the Xbox controller not supported? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#25 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwroGZujdpihg7vwbIvglSesU97Y4yks5vLlfBgaJpZM4ayXvR .

Ahh, you were right, the Xbox controller plays it a LOT better :smile:

I got it working very well. The scale values tuned perfectly. Feels like a drone racing simulator now. Here is the pull request on the ros-universal-teleop: https://github.com/mit-fast/ros-universal-teleop/pull/1

You are welcome! By the way hats off to you guys.

Winter-Guerra commented 5 years ago

No problem! Thanks for the pull request! It has been merged.

On Sat, Feb 9, 2019, 02:59 Bhavyansh Mishra notifications@github.com wrote:

Keyboard control for throttle is not great because drones are not meant to be controlled via keyboard. It feels a LOT better with joypad. Keyboard and joypad are only meant for debugging, since this is an autonomous drone challenge. Xbox controller could work, but would need some button/axis remaps. Take a look at the universalteleop node and the different possible launch configs. We only support one controller type out of the box (Logitech F310) for the moment. Might add Xbox in the future if there are enough requests. Perhaps make a feature request GitHub issue or a pull request? … <#m-9216037457810388808_> On Sat, Feb 9, 2019, 00:08 Bhavyansh Mishra @.***> wrote: Try doing a pull and run it again. I think that your teleop was running at a sub realtime rate. I turned on realtime simulation rate forcing in the teleop config. The yaw, pitch and roll responses are now more realtime, but the throttle and gravity feel really unnatural. Also, is the Xbox controller not supported? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#25 (comment) https://github.com/mit-fast/FlightGoggles/issues/25#issuecomment-462014408>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwroGZujdpihg7vwbIvglSesU97Y4yks5vLlfBgaJpZM4ayXvR .

Ahh, you were right, the Xbox controller plays it a LOT better 😄

I got it working very well. The scale values tuned perfectly. Feels like a drone racing simulator now. Here is the pull request on the ros-universal-teleop: mit-fast/ros-universal-teleop#1 https://github.com/mit-fast/ros-universal-teleop/pull/1

You are welcome! By the way hats off to you guys.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mit-fast/FlightGoggles/issues/25#issuecomment-462023531, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOwrnx7ZtK1oyR9faIuYGGHFIXRLxdnks5vLn--gaJpZM4ayXvR .