Comments (11)
Hi @ashwinvk94,
At the moment, restarting the launch file is the only way to restart the simulation after a collision. If you'd like to do tests without collisions enabled, it is possible to disable them. We're looking into making an easier way of restarting the simulation in the future, but for right now restarting the launch file or disabling collisions is the only way.
Best,
-Winter
from flightgoggles.
Got it thanks.
from flightgoggles.
@Winter-Guerra I've disabled collisions, the drone starts to fly, then I want to reset it. Is /uav/input/reset
topic working? I've tried a number of ways to publish to it and nothing seems to reset it (by which I mean put the drone back to the starting position on the ground).
For example, I've tried amongst others:
rostopic pub /uav/input/reset std_msgs/Empty "{}"
When I initiate that command, I get the following output and nothing ever happens with the drone:
publishing and latching message. Press ctrl-C to terminate
I see there are no subscribers to that topic. Is that a mistake or is there another way to reset the drone?
from flightgoggles.
Hi @PHRABAL, restarting the dynamics node is currently the fastest way to reset the drone to the start position. However, we accept pull requests!
from flightgoggles.
Hi all,
We have an initial implementation of a quick reset function. In our implementation the drone will reset position on every collision. We're currently testing the patch and will release as soon as possible.
Best,
-Winter
from flightgoggles.
@Winter-Guerra great. In the meantime, I implemented a function to reset the env which does a rosnode kill combined with setting those nodes to respawn=True in the launch file. It works. Takes about 1-2 seconds to complete the loop on a p3.
from flightgoggles.
The new patch is out! FlightGoggles should reset the drone to the start position after a collision.
# Pull new flightgoggles source code
cd ~/catkin_ws/src/flightgoggles
git pull
# Force flightgoggles to redownload binary at build time
catkin clean
catkin build
from flightgoggles.
@Winter-Guerra Thanks for the quick add of this function. If we want to reset it manually other than a collision, is there a way to do that? Sometimes the drone gets "stuck" without registering an actual collision. There's actually a bunch of scenarios during training where we want to reset the drone other than an actual collision too. I can keep using my old way, but would love to use the new reset function if it's accessible.
from flightgoggles.
Hi @PHRABAL ,
You can reset the dynamics by publishing an empty message std_msgs/Empty
to the ropic /uav/collision
. E.g. from a terminal using the command:
rostopic pub /uav/collision std_msgs/Empty
Note that there is a timeout after each reset, during which the drone cannot go to armed state (similar to when the simulation is initialized and no thrust commands have been given yet). The timeout is set to 0.1 seconds by default, but you can change this in src/FlightGoggles/flightgoggles/config/drone/drone.yaml
where the parameter is listed as reset_timeout
.
Hope this helps,
-Ezra
from flightgoggles.
@eatal you made my day ... maybe week.
from flightgoggles.
Closing since this feature request has been implemented. Instructions for manual reset will be added to the README FAQ.
from flightgoggles.
Related Issues (20)
- A nice-to-have ROS topic HOT 1
- Changing the camera extrinsic HOT 2
- Link provided for downloading Abandoned Warehouse environment assets doesn't work. HOT 1
- Issue on Installing Flightgoggles Simulation Framework on Local Machine HOT 5
- Downloading Unity3D environment asset bundle HOT 1
- Error while: Running FlightGoggles Simulation Framework on Local Machine HOT 1
- Pixhawk
- FlightGogglesV3 binary is not working HOT 7
- camera pose HOT 2
- Depth images for the gates HOT 4
- ERROR in config: Unable to download URL HOT 1
- Failed to download Abandoned Warehouse environment assets HOT 1
- Broken images in documentation HOT 4
- Collision Detection on python/pyFlightGoggles HOT 1
- Abandoned wharehouse env HOT 2
- catkin build error HOT 7
- Stereo rendering in the provided Unity environment HOT 4
- Could not find ./FlightGoggles.x86_64 HOT 2
- X11 Forwarding BadAlloc (insufficient resources for operation)
- Download link for abandoned warehouse does not work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flightgoggles.