* Added disco_rotorcraft airframefile to be able to fly hybrid code
* Created files (airframe and flightplan) and added bebop_convergence to tudelft conf
* allow higher version bebop
* logging motor commands and accel bebop2
* Updated hybrid guidance indi variables for bebop2
* improvements
* Prepared bebop2 airframe for cyberzoo test
* Flying bebop in the cyberzoo
* increase outer loop gains
* bebop2 jsbsim file
* no failsafe thrust for rotorcraft
* use ekf2 for bebop2
* Prepared flightplan for outside test
* fix static heading
* Added disco_convergence
* Updated hybrid guidance with extra variables as macro for convergence test
* extended logger with nav target
* typo with the nav_target
* fix thrust estimate
* no ctrl eff scheduling
* Flown code Valkenburg
* Tuned Disco convergence and added nps sim
* 24-06-2021 flown disco code, noise on thrust
* Updated disco flight plan to increase and decrease altitude 20 meters in flight
* change thrust effectiveness
* cleanup
* logger default freq, lexer, etc.
* further small improvments
* lower frequency for AHRS_REF_QUAT
* use more lexer
Co-authored-by: Dennis van Wijngaarden <wijngaarden.dennis@gmail.com>
- add a generic linear kalman filter lib
- add a quad model with linear drag and simplified for recent jsbsim
- add example frame and noisy NPS sensor config
see "Estimating wind using a quadrotor" in IMAV2021 proceedings
- try to set the sensor frequency automatically at the correct value
- make more parameters configurable
- set higher bounds for all sensors to avoid saturation
- remove old unused files
- update airframe files
* Adding guidance changes on top of master branch
* [pprzlink] Update to new version
* [conf] Change airspeed sensor Neddrone4
Co-authored-by: Ewoud Smeur <ewoud_smeur@msn.com>
* First comit of clean branch
* Added new drone airframe files (xml and model folder) for gazebo
* Renamed sdf file for bebop drone with stereo cams
* Added custom configuration and control panel files
On branch stereoCamerasNewDrone
Changes to be committed:
new file: conf/userconf/tudelft/ralphthesis2020_conf.xml
new file: conf/userconf/tudelft/ralphthesis2020_control_panel.xml
* Added new files necessary for a new bebop model with stereo vision
On branch stereoCamerasNewDrone
Changes to be committed:
new file: conf/airframes/tudelft/bebop_ralphthesis2020_stereo.xml
new file: conf/flight_plans/tudelft/ralphthesis2020_stereo_cyberzoo.xml
modified: conf/simulator/gazebo/airframes/bebop_w_stereo_cams.xml
modified: conf/simulator/gazebo/models/bebop_w_stereo_cams/bebop_w_stereo_cams.sdf
modified: conf/simulator/gazebo/models/bebop_w_stereo_cams/model.config
modified: conf/userconf/tudelft/ralphthesis2020_conf.xml
* Replaced cameras on bebop (front + down) with a stereo setup
On branch stereoCamerasNewDrone
Changes to be committed:
modified: conf/simulator/gazebo/models/bebop_w_stereo_cams/bebop_w_stereo_cams.sdf
* Solved low resolution in left camera
On branch stereoCamerasNewDrone
Changes to be committed:
modified: conf/simulator/gazebo/models/bebop_w_stereo_cams/bebop_w_stereo_cams.sdf
* Created new module "wedgebu" and added it to the airframe "bebop_ralphthesis2020_stereo.xml"
Also, used "make" to create tool for creating modules
On branch wedgeBug
Your branch is up to date with 'origin/wedgeBug'.
Changes to be committed:
modified: conf/airframes/tudelft/bebop_ralphthesis2020_stereo.xml
new file: conf/modules/wedgebug.xml
modified: conf/userconf/tudelft/ralphthesis2020_conf.xml
new file: sw/airborne/modules/wedgebug/wedgebug.c
new file: sw/airborne/modules/wedgebug/wedgebug.h
new file: sw/tools/create_module/create_module_ui.py
new file: sw/tools/create_module/datalink_ui.py
new file: sw/tools/create_module/event_ui.py
modified: sw/tools/create_module/files_create.py
new file: sw/tools/create_module/init_ui.py
new file: sw/tools/create_module/periodic_ui.py
* Added functions to copy images from left and right camera to global variables
On branch wedgeBug
Your branch is ahead of 'origin/wedgeBug' by 1 commit.
Changes to be committed:
modified: conf/airframes/tudelft/bebop_ralphthesis2020_stereo.xml
modified: conf/modules/wedgebug.xml
modified: conf/simulator/gazebo/models/bebop_w_stereo_cams/bebop_w_stereo_cams.sdf
modified: sw/airborne/modules/wedgebug/wedgebug.c
* Added function to compare individual pixels of images types (image_t)
* Tried to figure out why the C++ Mat object of the left gray pixels looks different to the left image
* A rough implementation and proof of the copy function (note: copy buf entries by incrementing pointer)
Changes to be committed:
deleted: Color_Image.jpg
modified: conf/airframes/tudelft/bebop_ralphthesis2020_stereo.xml
deleted: merged_stereo_image.jpg
modified: sw/airborne/modules/wedgebug/wedgebug.c
modified: sw/airborne/modules/wedgebug/wedgebug.h
modified: sw/airborne/modules/wedgebug/wedgebug_opencv.cpp
modified: sw/airborne/modules/wedgebug/wedgebug_opencv.h
* Finalized 1) image merging function for YY image and 2) function for saving gray images using openCV
* Created C++ function to create and return disparity image. Also changed gazebo world.
* 1) Added FPS like controlls for drone, using Xbox controller. 2) Added cropping image functionality of block matching function.
* SBM can take 16 bit images now, save function uses an image_t struct and a new type called "IMAGE_OPENCV_DISP" was added, specifically for OpenCV disparity images.
* Added openCV dependent openin and closing functions
* Added 1) openCV dependent dilation and sobel operation functions, 2) 3d point structure to image.h 3) Loop in wedebug.c for findin edge point closest to target.
* Added functions to convert world coordinates to camera coordinates (turned out to be a wrong implementation. Next commit will be the correct implementation)
* Added functions to convert world to agent to camera coordinates (and vice versa)
* Cleaned up coordinate conversion functions
* 1. Created new world for drone testing, 2. Created new waytpoints for drone testing, 4. Created state machine template in module 5. Debugged the "SBM_OCV" function 6. Filled in the state for "Initial position", "Move to start", "Start position" and "Goal reached" 7. Started to fill in the state "Move to goal" 8. Created function to get median distance of object in front ("median_disparity_to_point") 9. Created function to determine angle between drone and goal point ("heading_towards_waypoin") 10. Cleaned up code, removed non-essential variables (especially images) and added new variables.
* Converted edge detection algorithm into a function and cleaned code more. Also created more global variables.
* Added draft approach for "EDGE_DETECTION"
* Quick save
* First draft of code. The robot can evade a board in its way and reach the goal. Also increase periodic loop speed to 15 hz to counter the fast turning of the drone
* Included code for measuring metrics and displaying them. Also, cleaned the code some more.
* Cleaned code, added comments to describe code and variables and got rid of bug in function calculating heading direction.
* Removed bug in POSITION_EDGE state, where a new holding point was not set, after an obstacle was encountered. Also added various shapes (with birck texture) for testing.
* Added more shapes for experiment and added settings to change in GCS
* Changed camera settings to mimic those of Mathies et al. 2014. The drone can now avoid the standard metal board and the brick wall (type 2 2 x 2 meters)!
* Implemented state machine for control modes.
* Simplified code
* Cleaned code
* Added a flag to detect changes in the navigation mode used
* Merged background processes under the condition that the state machine is running in certain state
* Debugged time measurement of total time (metric 1)
* Cleaned code
* MAde debug options state number independent (i.e. they have been renamed to include the name of the state and not the number)
* Remove states: POSITION_INITIAL, MOVE_TO_START and POSITION_START from finite state machine. Also all associate variables have been removed.
* Changed "NUMER_OF_STATES" to "NUMBER_OF_STATES". Also increased "max_obstacle_confidence" from 3 to 5, to avoid fake obstacle detection.
* Added metric measurement when in direct flight.
* Added aluminum bar as object for goal marker and creted button for drone to move to start position and another button for drone to start the experiment. In the current example the drone goes around a 2x2 meter wall.
* Added saving flag and functions for report (in c and cpp file)
* Added median kernel dimensions as options in settings
* Made unused waypoints invisible in the GCS
* Added two more objects for investigation (with a larger hole for the drone to fly through). Also fine tuned the code.
* Commit before change of depth image.
* Added 16 bit background processes for greater precision. Also change some funciton in C++ file to better handle 16bit images
* Using depht works, but its not fine tuned and code is messy.
* Ibligatory commit so that I can checkout a different branch.
* Added depth image on which edge detection is now based on (used to be based on disparity). It works relatively ok with all shapes investigated.
* A save after the experiments for the first repor thave been finalized.
* After demonstration
* Added code to toggle between p2DWedgeBug and p3DWedgeBug.
* Removed original files that were created during the previous merge process.
* Added background processes that works with a 16 bit disparity image (i.e. more precise distance measurement)
* Made finite state machine more readable. Also refined find_best_edge coordinates2 function. Additionally, added function to got from image place coordinates to camera coordinate using depth as input. Lastly, depth is now measured in cm when considerring the thresholds.
* Successfully integrated edge search over depth image instead of disparity image (tested in direct control mode only). Next step is to implement this for the guided mode.
* Addressed bug: The baseline used by the drone model was not the same as in the c file. This has been changed such that the baseline in the drone model now resembles the one in the c file.
By addressing this bug of the Bug algorithm the drone can now judge distances accurately. This in turn results in the drone being able to accurately avoid the wall (2mxm) obstacle.
* Changed flight plan to start experiment atuomatically.
* Just a checkpoint
* Added tree models.
* Removed non used objects from world file.
* Reverted back to opencv_bebop
* Reverted back to original files for push to master
* Added new shapes for experimentation
* Deleted blacklisted
* Cleaned code before push
* Added missing varibales and added declarations.
* Run style bash script and renamed image enum name (IMAGE_INT16)
* Corrected typos and delted unused control panel config file.
* simulation for bebop without act feedback
* Remove use of variable length arrays in WLS CA
Instead use defines to fix the length of arrays at compile time
* Use module conf to set control allocation size
By defining the control allocation problem size in the makefile section
of the module xml, there is no need to introduce a dependency on the
generated airframe file in the wls_alloc code
* Fix bebop simulation problem
Somehow the small inertia caused the drone to start upside down, maybe
some kind of overflow somewhere? In any case, this small change was
enough to do a simulation without issues...
This pull request updates the Bebop camera simulation in order to work with the new defines and settings from #2364. It also includes a number of small fixes by @kirkscheper .
The new setup renders the entire camera sensor, which allows the crop and zoom settings to be changed at runtime just as on the real drone. The resolution of the simulated sensor can be reduced for better runtime performance.
----
* update gazebo sim camera
* WIP Revert Bebop SDF cam hfov to 3.0, TODO update to full sensor size
* WIP mt9f002.c remove OUTPUT_SCALER comment
* WIP FIX image.c casting problem
vectors.pos is now cast to float to prevent unwanted implicit
casting to uint. I did not change the point_t types as I
do not have time to test this, but this would be a good idea for a later
pull request.
* WIP lucas_kanade.c comment keep_bad_points
* WIP opticflow_module.c replace memcpy with assignment for readability
* WIP nps_fdm_gazebo fix mt9f117 check for bottom_cam instead of front_cam
* WIP nps_fdm_gazebo do not set env_texture_size
The current size (2048) is probably large enough for all
realistic ZOOM settings.
* WIP ERROR nps_fdm_gazebo fix camera, corrupt image in gazebo :/
* WIP ERROR zoom is not tuneable at runtime :/
* WIP fixed sensor resolution in gazebo
Since the zoom should be adjustable at runtime, the zoom factor
will need to be implemented in the image sampling routine,
it cannot be set beforehand in the bebop model.
* WIP include mt9f002.c and mt9v117.c in NPS
Added simple wrapper files to prevent overwriting the video_thread_nps.c ones.
* WIP enable runtime zoom and offset changes for mt9f002 in NPS!
Zoom and offset settings can now be adjusted at runtime just like
on the real drone. The mt9f002.c code handles the bounds checking
etc.
* WIP take out string comparison in read_image
* WIP ignore GCC errors that do not appear in compilation for ARM
Might be better to actually fix these errors, but I am not familiar
with that part of the code.
* WIP remove todo file
* FIX ardrone2_gazebo build error
linking error was caused by undefined reference to mt9f002 struct
(which is not used in the ardrone). Removing the NPS MT9F002 define
means that this struct is always linked, even though it may not be
used. To fix, I added an empty `__attribute__((weak))` struct that
prevents these linking errors, but could cause unexpected behavior
when a Bebop model or other model with mt9f002 camera is used
without the bebop_cam module.
* FIX naming conflict after merge
* FIX Allow arbitrary simulated sensor sizes for runtime improvement
The FDM can now handle arbitrary sizes for the camera sensor.
This allows the sensor size to be reduced from the real-world
4608x3288 to a lower resolution to reduce rendering times, at
the cost of lower-resolution images.
The downscaling of the sensor is controlled using the
`NPS_MT9F002_SENSOR_RES_DIVIDER` define.
* Update Bebop 2 gazebo models for new front- and bottom cam code
* Merge cyberzoo model (squashed)
Squashed commit of the following:
commit 4ea7054205
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Tue Feb 6 11:30:28 2018 +0100
Remove origin marker from worlds
commit c008c9658a
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Feb 2 17:25:11 2018 +0100
Compress textures
Reduced texture dimensions. Size of model folder is now approx.
20 MB instead of 60+ MB.
commit 5b63fc1988
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Feb 2 17:03:26 2018 +0100
Minor tweaks to models
commit ed003351d1
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Feb 2 15:26:28 2018 +0100
Add cyberzoo props
commit 751b94364a
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Feb 1 15:03:30 2018 +0100
Restore cyberzoo floor collision box
commit 1d4fd2d92f
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Feb 1 14:59:44 2018 +0100
Add cyberzoo surroundings to main model in separate layers
commit 9df9f2832c
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Feb 1 14:48:06 2018 +0100
Separate cyberzoo model into layers
Makes it easier to hide parts of the model in the GUI.
commit f8c4221e98
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Feb 1 11:47:52 2018 +0100
Add daylight in windows on outer walls
commit b0e6a0c572
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Mon Jan 29 16:25:08 2018 +0100
Remove old cyberzoo model, fix dependencies
commit dd54000771
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Mon Jan 29 15:04:43 2018 +0100
Add cyberzoo world with orange poles for orange_avoider
commit a34e285082
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Mon Jan 29 14:30:47 2018 +0100
Set world coordinates and rotation, fix naming conflict
commit 1a99ebb7bd
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Jan 18 11:58:06 2018 +0100
Create cyberzoo world
To-do: set origin coordinates and rotate environment
commit ebf7eaf9a7
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Jan 18 11:41:37 2018 +0100
Minor fixes to surroundings
commit c57312c557
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Jan 18 11:15:09 2018 +0100
Add updated cyberzoo surroundings and outside walls
commit 58914e14ae
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Wed Jan 17 17:24:57 2018 +0100
Add first draft of cyberzoo surroundings
commit 40712f5f3b
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Tue Dec 12 13:45:25 2017 +0100
Fix cyberzoo origin
commit e47f76cee5
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Tue Dec 12 13:34:11 2017 +0100
Fix orange_pole2 smoothing errors
commit b1e08695e7
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Tue Dec 12 13:09:09 2017 +0100
Add orange pole and traffic mat objects
commit 8bd3d214e6
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Dec 8 14:48:53 2017 +0100
Fix optitrack camera color
commit 59e7b67fef
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Dec 8 14:43:39 2017 +0100
Fix lighting colors
commit 810e6124c1
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Dec 8 14:20:47 2017 +0100
Fix optitrack cameras
commit e6e17c2677
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Fri Dec 8 14:10:55 2017 +0100
Import improved model
commit e9ed496af9
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Thu Nov 30 16:38:22 2017 +0100
Fix ambient lighting of cyberzoo_solid
commit 0e1c2600d6
Author: Tom van Dijk <tomvand@users.noreply.github.com>
Date: Wed Nov 29 14:38:05 2017 +0100
First steps towards detailed cyberzoo model. Got transparency working.
* Fix altitude overshoot in simulation
- Bypass INS
- Set nominal hover throttle to 0.51 (verified in simulation and on real drone).
* Fix INS horizontal offset
- Set flight plan origin to match gazebo spherical coordinates,
prevents https://github.com/paparazzi/paparazzi/issues/2134#issuecomment-342493105
* Increase link lost timeout to 5s
Otherwise gazebo will continuously lose link. Might need to lower
this for real-world flights...
* Fix image.c compilation warnings
* Move dummy waypoint to 0, 0
Should prevent "waypoint 'dummy' too far from HOME" warnings when
max_dist_from_home is small (e.g. cyberzoo flightplans) and when
HOME is set appropriately close to the flight plan origin.
* Rename 2017 -> 2018
Also removed simulation aircraft as it is no longer necessary.
* Move modules to firmware section
* Restore original nominal throttle
Nominal throttle of 0.51 was measured without bumpers! 0.68 is correct
with bumpers attached. Instead, increased the weight of the gazebo model.
* Clean up control panel
- Removed Bebop video stream since it did not work
- Removed the Gazebo tool. When pointed to /usr/bin/gazebo it does actually start, but
the GAZEBO_MODEL_PATH appears to be ignored this way.
Also added conf/video.sdp to simplify video streaming (no such file
was present in var).
* Tag airframe after successful test flight
Performed test flight in cyberzoo with course2018_orangeavoid flightplan in NAV mode.
* Fix Gazebo tool, add Simulation - Gazebo + Joystick session
The new gzclient_launcher.sh script sets up the correct GAZEBO_MODEL_PATH
(which was not available when gzclient was started from the Paparazzi Center
even if it was added to ~/.bashrc). It also allows the client to be killed
from the pprz center.
* FIX remove natnet from simulation session
* Retune INDI for Bebop1 with bumpers
Previous tuning resulted in slight attitude oscillations.
* Tag after successful testflight
* Add GCS flags
* Change gazebo bebop colors
* Disable light and shadows
Top light caused ogre crash in gazebo 8.3 (not sure if version error or weak gpu).
Disabled shadow for performance since there is no light anymore.
* Reduce bebop front cam FoV to fix AxisAlignedBox crash in gazebo7
Apparaetly gazebo 7 does not yet support wide-angle cameras with
HFoVs above 180deg.
* Distance Counter Python
* Cleanup after merge
* Remove image.c fix (see #2237)
* Add 'Simulation - Gazebo' session
Avoids errors when joystick is not connected.
* First steps towards detailed cyberzoo model. Got transparency working.
* Fix ambient lighting of cyberzoo_solid
* Import improved model
* Fix optitrack cameras
* Fix lighting colors
* Fix optitrack camera color
* Add orange pole and traffic mat objects
* Fix orange_pole2 smoothing errors
* Fix cyberzoo origin
* Add first draft of cyberzoo surroundings
* Add updated cyberzoo surroundings and outside walls
* Minor fixes to surroundings
* Create cyberzoo world
To-do: set origin coordinates and rotate environment
* Set world coordinates and rotation, fix naming conflict
* Add cyberzoo world with orange poles for orange_avoider
* Remove old cyberzoo model, fix dependencies
* Add daylight in windows on outer walls
* Separate cyberzoo model into layers
Makes it easier to hide parts of the model in the GUI.
* Add cyberzoo surroundings to main model in separate layers
* Restore cyberzoo floor collision box
* Add cyberzoo props
* Minor tweaks to models
* Compress textures
Reduced texture dimensions. Size of model folder is now approx.
20 MB instead of 60+ MB.
* Remove origin marker from worlds
* Move CyberZoo models to submodule
- All new models are moved to the tudelft/gazebo_models repository, which is included as a submodule in sw/ext/tudelft_gazebo_models/
- Changed vehicle and world SDF loading to use URI's, these can be used with multiple search paths
- Added gzclient_launcher.sh script that sets up environment variables before launching gzclient. This prevents errors if the user forgets to add the paths to .bashrc. Added as a tool to control_panel_example.xml
* First attempt at bebop fisheye camera
* Try setting raw camera output size during initialization, does not work
SetImageSize() is ignored and SetEnvTextureSize() causes an
exception. Currently the camera output is too large for real-time
operation.
* FIX apply MT9F002_OUTPUT_SCALER to gazebo front camera
* Add MT9F002 camera cropping to fdm_gazebo
* Apply MT9F002_TARGET_FPS to bebop front cam in gazebo
* Set up bottom camera for bebop model
* Minor fixes and cleanup
* Fix MT9F002 partially applied to all cameras
* Remove sensors_params_bebop, introduce NPS_SIMULATE_MT9F002
Reduces duplicate code for sensor parameters, and follows the
same pattern as NPS_SIMULATE_LASER_RANGE_ARRAY.
Also does not require the sensor params to be changed in every
bebop airframe.
* Add gazebo model for Parrot Bebop 1
* Add first-order high pass filter
* First implementation of actuator dynamics and spinup torque
Flies ok with PID control
Does not fly ok with INDI, the required G1 R is 0.159 instead of
0.0022 (estimated by flying in adaptive mode). The other parameters
are close to those specified in the airframe file.
* FIX incorrect yaw behavior
Fixed two bugs:
1. gazebo_actuators.torques was set to NPS_ACTUATOR_THRUSTS
2. spinup torque direction is now also controlled by motor mixing
* Clean up debug code and file logger
* Clean up gazebo example airframes
* Minor cleanup
* FIX warnings about missing initializer in fdm_gazebo
* Update documentation
* Remove modules section, move to firmware
* Minor fixes to fdm_gazebo and high_pass_filter
* Move actuator dynamics to included airframe files
Should prevent duplicate actuator defines spread accross all
airframe files.
* Fix FILTER_ROLL_RATE in bebop2_indi airframe
Moved to firmware targets so it will be disabled in gazebo.
Is this actually working in jsbsim??
* Update documentation
* Fix newlines
* Minor fixes in nps_fdm_gazebo.cpp
* Re-enable filter roll rate
Caution: causes oscillations around roll axis in gazebo
* Disable roll filter and cleanup
* Cyfoam, ctrl effectiveness scheduling, JSBsim
- Added Cyfoam airframe file
- Added control effectiveness scheduling function
- More advanced scheduling function should be added in the future
- Added simple JSBsim files for Cyclone for a crude simulation
* only calculate pseudo inverse when using it
* Gazebo Cyberzoo and OrangeAvoid in tudelft conf, Simulate when no RC, call gzclient as tool
* [orange_avoider] color setting
* docs+remove modules section
* added rangesensors to gazebo model and NPS
* added module to handle the range sensors
* added sender IDS and added to abi messages
* added abi message to flight plan guided
* Add drag to gazebo ardrone model
Simple linear drag with guessed coefficient, not super accurate
but better than no drag at all...
* Fix#2090
Set accelerometer sensor bounds to correct values.
* Setup code for Gazebo
Currently only partially initializes the fdm struct, which produces
incorrect results in the GCS.
Compilation, however, already seems to work as expected!
Next step is to fetch data from Gazebo.
* Closed-loop flight in Gazebo
Finished the first implementation of the Gazebo FDM. It is now possible
to perform closed-loop flights using Paparazzi together with Gazebo.
Look at the example_ardrone2.xml airframe file for the required gazebo tags.
The following modifications are made:
- change fdm type to "gazebo"
- add definitions for ACTUATOR_THRUSTS and ACTUATOR_TORQUES. These were
obtained from the JSBsim ardrone model. The oredr is the same as the
ACTUATOR_NAMES.
The Gazebo world needs an aircraft model that is (by default) named
"paparazzi_uav". This model should include links with the names listed
in ACTUATOR_NAMES in the airframe file, as these are used to apply
forces on the quadrotor.
Known bugs:
- No fixed wing aircraft yet.
- Not all fields in the fdm struct are set. Most of the atmosphere
fields are not implemented yet.
- AHRS and INS need to be bypassed, these do not yet work correctly.
- No quadrotor models are supplied with paparazzi yet (although it is
included in the example world file).
* Added cameras, but sensor update causes crash
As in the quick standalone examples, gazebo regularly crashes when
cameras are used.
This is an intermediary commit where most of the camera infrastructure
is present, but not functional yet because of an unknown bug regarding
Gazebo.
* Simplified problem, located crash
Crash occurs when gazebo::sensors::run_once() is called during
the fdm update step. The exception (Ogre internal exception,
cannot create GL vertex buffer) only occurs after the main loop
has been performed a few times (10-20x typically).
Ignoring the error by catching the exception does not make it go
away.
* Add ogre to fdm_gazebo makefile
* Further changes for debugging, not fixed yet
* FIX bug
Turns out that fdm_init and fdm_run_step are not running in the same
thread, which apparently caused some problems with Gazebo.
The gazebo initialization code that starts the server is now moved
to the run_step function, and cameras work fine now.
Next step is to get the images from Gazebo to the video_thread_nps module.
* Transport images to Paparazzi
Added code that converts Gazebo's RGB888 images to Paparazzi's
YUV422 format, and calls the registered video callbacks.
* Finish video streaming
Finished video streaming. Video streaming in the paparazzi master
branch does not seem to work in simulation or even on a real ardrone.
Therefore, reverted to v5.10 viewvideo.c and rtp.c and now the streaming
works correctly.
* Separate UAV model from world.
Added a models/ directory to conf/simulator/gazebo, now the UAV model
can be included in the world file. The models/ dir is added to Gazebo's
search paths when the server is launched, so it does not require
any additional steps from the user.
* Move Gazebo modifications from examples/ardrone2.xml to examples/ardrone2_gazebo.xml
Reverted changes to the original airframe and moved these to a
separate example.
* Remove .sdp file
Remove .sdp file that should not have been included with commits.
* Move changes in conf_example.xml to separate entry
Moved the changes to conf_example.xml (selected flightplan, modules etc.)
to a separate etry named 'ardrone2 (Gazebo)'.
* Clean up changes to computer_vision module
- Removed unused viewvideo_nps.c.
- Add doc comments in video_thread_nps.c
* Fix bug in conf_example
Spaces in aircraft name caused compilation error, changed to
'ardrone2_gazebo'.
* Fix duplicate ac_id in conf_example
* Remove debug code from nps_fdm_gazebo.cpp and add comments
* Reduce weight of cameras
Cameras weighed 10 grams, which was quite much. Now reduced to 1 gram.
* Fix camera not active
During the cleanup of the ardrone gazebo model, the always_on tag
was removed. Now, the cameras are activated during gazebo_video_init
Also removed further debug code from nps_fdm_gazebo.cpp.
* Restore master branch video streamer and rtp encoder
The streamer of the master branh does not work correctly atm, but
this will be moved to a separate issue.
* Fix compilation warnings
Fixed all compilation warnings (tested with Gazebo 8).
Unused arguments are now marked as such.
The NPS makefile is modified to use CXXFLAGS in addition to CFLAGS,
which solves the std=c++11 related warnings.
fdm_gazebo.cpp now ignores deprecated warnings, as all of these
come from Gazebo. Not the cleanest solution, but it works for now.
* Add documentation to fdm module xml and add copyright notices where appropriate
* Fix code style
Fixed code style using the tool included with paparazzi.
* Fix missing model.config
.gitignore caused the model.config files for the Gazebo models to
be excluded from the commit. Added an exception to .gitignore and
added the missing file.
* Fix INS by adding placeholder atmospheric data values
Added placeholder values to the atmospheric section of the NPM
struct. These should be valid for low altitude, low speed flights.
Previously, these values were uninitialized which caused INS to fail
(incorrect altitude estimates). With these placeholder values,
the INS works ok and no longer needs to be bypassed.
* Fix makefile targets in video_rtp_stream and cv_colorfilter
(Re)added target="ap|nps" attribute to the module .xml files.
* [nps] add angle of attack and sideslip to NPS
* [module] extra_dl can work with nps
* [module] add sideslip sensor to aoa_pwm module and fix apogee board file
* [module] add wind estimation module
This module is an experimental wind estimation filter based on UKF that
aims at estimating all 3 local wind components in real-time.
It is based on ChibiOS as the algorithm runs in a dedicated thread.
The algorithm itself is generated from a Matlab/Simulink model.
* [tool] read Meso-NH meteo data and feed NPS with wind information
* [module] remove nps target from extra_dl, uart not well supported on FW
* [mesonh] remove unused UDP interface
* [chibios] add compilation error message for wind estimator module
* FlighGear and Ivy thread working
* Main loop replaced with main_thread
* Cleaned up nps_main
* HITL main - test TX with Vectornav
* Added AggieAir control panel
* [modules] Flight logger module added
* [fixedwing] Airframe configuration updated
* [hitl] Proof Of Concept - IO and simulation running
* [nps] Minor changes in main hitl
* [nps] Performance Test with Pthread library
* [hitl] Working with pthreads instead of glib threads
* [hitl] Minor updates
* [nps] Refactoring to get rid of Gthreads
* [nps] Minor changes, added mutex guards
* [nps] Minor Ivy fix
* [nps] Threads working properly
[hitl] Ins separated
* [hitl] Check for launch variable
* [nps] Refactoring makefile into common and hitl/sitl specific
* [hitl] Hitl works, sitl too
* [hitl] ins_vectornav comments
* [hitl] Updated launch routine
* [nps_hitl Cleaned up version of NPS/HITL
- added support for ACTUATORS message (Rotorcraft)
- resolved start issue for Fixedwing (works fine now)
- minor improvements in threads (fg_thread, ap_init)
* [nps] Minor fixes to save current work
* [nps] Minor fixes
* Update to latest pprzlink
* FlighGear and Ivy thread working
* Main loop replaced with main_thread
* Cleaned up nps_main
* HITL main - test TX with Vectornav
* Added AggieAir control panel
* [modules] Flight logger module added
* [fixedwing] Airframe configuration updated
* [hitl] Proof Of Concept - IO and simulation running
* [nps] Minor changes in main hitl
* [nps] Performance Test with Pthread library
* [hitl] Working with pthreads instead of glib threads
* [hitl] Minor updates
* [nps] Refactoring to get rid of Gthreads
* [nps] Minor changes, added mutex guards
* [nps] Minor Ivy fix
* [nps] Threads working properly
[hitl] Ins separated
* [hitl] Check for launch variable
* [nps] Refactoring makefile into common and hitl/sitl specific
* [hitl] Hitl works, sitl too
* [hitl] ins_vectornav comments
* [hitl] Updated launch routine
* [nps_hitl Cleaned up version of NPS/HITL
- added support for ACTUATORS message (Rotorcraft)
- resolved start issue for Fixedwing (works fine now)
- minor improvements in threads (fg_thread, ap_init)
* [nps] Minor fixes to save current work
* [nps] Minor fixes
* Update to latest pprzlink
* Fixed the feed function
* Compilation fixes
* More compilation fixes
* Last compilation fixes
* Added a simple automated flight plan (auto take off and landing)
* Fixes in NPS
* Removed SBUS fakerator
* Removed superfluous "else"
* Renamed "flight recorder" to "xgear"
* Fixed formatting
* Updated extra_dl module
* Initial support for extra_dl to run over USB serial
* Fixed usb_serial for extra_dl
* extra_dl_periodic() called at TELEMETRY_FREQUENCY