142 Commits

Author SHA1 Message Date
Gautier Hattenberger 37a86bb389 [indi] rewrite indi stabilization and guidance for modularity (#3565)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
This PR allows to redefine the outer-loop for stabilization and
guidance, and to specify the guidance model for something else than a
quarotor (but still not an hybrid).
Two use case are proposed:
- replace the PD control of the outer-loop (still used by default) by
  and Hinfinity controller
- parametrize the guidance for an hexa-copter with tilted motors,
  allowing to produce side force for lateral motion control.
2026-02-02 18:41:03 +01:00
NoahWe e42a7ef901 [rotwing] V3B Delivery (#3449)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
* rebase with master

* undo double define during rebase

* revert eff sched changes
2025-08-15 16:00:32 +02:00
Fabien-B 4df4c8436b Imu scale float (#3477)
* [imu] Use floats for scaling

* [imu] default scales float

* [imu] update comments

* Fix print function

* [imu] fix calibration

* [imu] calibration in float

* [imu] remove old calibration generation.
compilation error if IMU_IMU_ACCEL_CALIB is defined.

* remove static operations

Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>

* clarify scales

---------

Co-authored-by: Fabien-B <Fabien-B@github.com>
Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
2025-06-25 13:27:53 +02:00
Gautier Hattenberger 4b6c185516 [hybrid] add basic support for Heewing T1 Ranger VTOL (#3464)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled
Docker update / build_docker_image (push) Has been cancelled
The Ranger T1 is a tilt-rotor hybrid plane. As a first basic approach,
two separated controls are used for hovering (INDI) and forward flight
(PID). The mixing is done by a dedicated module and the autopilot is
customized to support the specific modes.
A simple PID controller is added to the rotorcraft firmware as it is not
possible to directly reuse the one from fixedwing firmware.
In a future work, a full INDI version might be used, but this approach
can still serves as an example of customized autopilot.
A simulation model for JSBSim is also provided.
2025-06-24 15:02:36 +02:00
Tomaso Maria Luigi De Ponti 5ae4fd913f Changes to Rotwing 7kg simulator and Actuator dynamics (#3394)
* First push

* More airframes adapted
2024-10-15 13:55:50 +02:00
Christophe De Wagter 91e4c4b0a0 [rotwing] update simulator models (#3375)
* [rotwing] update simulator models

* revert
2024-10-01 11:07:59 +02:00
Tomaso Maria Luigi De Ponti ecb94ad478 ONELOOP controller updates (#3333) 2024-07-16 13:28:31 +02:00
Christophe De Wagter 7c035434ef Oneloop Controller Updates (#3261) 2024-06-18 11:24:07 +02:00
Christophe De Wagter 3d87525cd1 Fixes for master: prevent falling over on simulation start and fix 2nd order filter (#3312)
* prevent falling over on simulation start

* Small fix for new inflight filter tuning.

---------

Co-authored-by: Ewoud Smeur <e.j.j.smeur@tudelft.nl>
2024-06-15 22:39:40 +02:00
Ewoud Smeur 35e90b5d2d add nav_hybrid module to rotorcraft disco (#3275) 2024-05-23 10:06:14 +02:00
Dennis-Wijngaarden 16068cc905 [rot_wing nps] add more aerodynamic drag in rotwing simulation (#3259)
* [rot_wing nps] add more aerodynamic drag in rotwing simulation

* Triple the CD * surface

---------

Co-authored-by: Christophe De Wagter <dewagter@gmail.com>
2024-04-16 18:03:10 +02:00
Ewoud Smeur 69f2248a32 INDI restructuring (#3256) 2024-04-04 10:55:41 +02:00
Gautier Hattenberger 2ae4fed4e3 [conf] update Enac rotorcraft so that they work in simulation as well (#3235)
- update Enac rotorcraft airframes
- remove dead aircraft
- add jsbsim model files
- update bebop2 example
2024-02-07 13:54:55 +01:00
Gautier Hattenberger fe35af7382 [nps] fix inconsistent sensor scaling in simulation (#3230) 2024-01-29 16:19:05 +01:00
Christophe De Wagter 5c04a35a30 [quadplane] simulator, telemetry and visualizers ---> PR 3173 (#3173) 2023-11-11 10:26:48 +01:00
Christophe De Wagter cb97031d47 [airframes] RW25kg (#3133)
* [airframe] RW25kg
2023-10-09 08:08:32 +02:00
Christophe De Wagter 4c848665d7 [jsbsim] Morphing quadplane models (#3125) 2023-10-03 12:51:54 +02:00
Fabien-B 2a98d9fb69 Add PyBullet FDM for nps. (#3024) 2023-04-16 22:10:53 +02:00
Ewoud Smeur dc998be91d Nederdrone ctrl scheduling + moving target app (#2957)
* Nederdrone ctrl scheduling + moving target app

- Nederdrone airframe files
- Ctrl effectiveness scheduling
- Target position communication and planning
- Approach to a moving target guidance

* Update conf

* fix compilation problems

* flight plan compatible new GCS

* remove module test

Co-authored-by: Freek van Tienen <freek.v.tienen@gmail.com>
2022-12-16 16:02:16 +01:00
Ewoud Smeur 6a44445dd2 Convergence rebase (#2946)
* 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>
2022-11-23 21:21:17 +01:00
Fabien-B ad01121a17 [nps] Fix IMU and MAG signs. (#2937) 2022-10-26 10:38:17 +02:00
ALI JAMEI 3c565adb1a [nps] fix imu sensitivity (#2925) (#2926)
setting correct sensitivity if needed

fix #2925
2022-10-12 11:17:18 +02:00
Gautier Hattenberger ea674de286 [nps] fix imu neutrals (#2918)
setting correct neutrals if needed, not required with new ImU
calibration

fix #2917
2022-10-09 07:18:29 +02:00
Freek van Tienen 3e473e72a6 [imu] Enable IMU integration and fix small mistakes 2022-09-21 23:05:11 +02:00
Freek van Tienen 4b28d6d592 [nps] Set the default sensor parameters 2022-09-20 14:37:58 +02:00
Freek van Tienen ff37e63af4 [imu] Fix new imu structure 2022-09-20 14:37:58 +02:00
Pietro Campolucci eea959e29b Bebop flightgear (#2827)
* added bebop in flightgear

* added credits

* fixed gazebo models
2022-02-19 21:51:11 +01:00
Gautier Hattenberger e075daf06f [module] wind estimation from quadrotor motion (#2800)
- 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
2021-11-28 22:24:44 +01:00
Gautier Hattenberger 7408724495 [modules] move IMU from subsystems to modules 2021-11-13 00:48:14 +01:00
Gautier Hattenberger db64a3819c [nps] clean sensors params files (#2769)
- 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
2021-08-24 15:27:10 +02:00
Ewoud Smeur 3217e4167e FIX simulation mag saturation 2021-08-20 10:53:06 +02:00
Freek van Tienen c52a0b7e58 Navy guidance (#2724)
* 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>
2021-05-18 16:28:01 +02:00
Freek van Tienen febbd541b0 [conf] Cleanup TUDelft NederDrone 2021-05-04 17:31:58 +02:00
Freek van Tienen 627ecce31b [actuators] Add UAVCAN actuators for chibios (#2511)
* [actuators] Add UAVCAN actuators for chibios

* [conf] Fixes for Nederdrone

* [conf] Cleanup nederdrone

* [boards] Fix FMUv5 i2c DMA

* [conf] Fixes for Nederdrone4

* [actuators] Add uavcan simulator

* [uavcan] Rewrite to seperate module for actuators and sensors
2021-04-20 14:10:25 +02:00
Ewoud Smeur 3b4ce8232e Cyclone guidance code (#2533) 2020-07-27 15:35:26 +02:00
Ralph R. Schmidt d047a9bb81 StereoWedgeBug (#2555)
* 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.
2020-07-17 18:53:28 +02:00
Ewoud Smeur 66a0f367a7 WLS VLA (#2523)
* 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...
2020-04-17 22:12:20 +02:00
Kirk Scheper 0391b4df26 [nps][bebop] update gazebo sim camera (#2383)
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
2019-06-17 10:39:51 +02:00
Tom van Dijk 2430b31f0f [gazebo] add ROS support and sonar sensor (#2399) 2019-02-28 09:58:12 +01:00
Christophe De Wagter 58cbb73d68 Gazebo model of the 2018 dronerace track (#2335)
* New Gazebo Models for ADR2018

* Add gazebo simulation session to controlpanel
2018-10-04 21:30:42 +02:00
Tom van Dijk c0741e01ab MAVLab course 2018 (#2268)
* 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.
2018-05-30 17:34:03 +02:00
Tom van Dijk c870e27ac5 [gazebo] Cyberzoo model (#2230)
* 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
2018-05-30 15:32:10 +02:00
Tom van Dijk ff8c58a190 [gazebo] Simulate Bebop1 camera (#2225)
* 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.
2018-02-04 18:03:41 +01:00
Tom van Dijk cfabb51eed [gazebo] Add actuator dynamics and bebop model (#2219)
* 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
2018-01-30 16:39:18 +01:00
Ewoud Smeur 95e60fe50d Cyfoam, ctrl effectiveness scheduling, JSBsim (#2145)
* 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
2017-12-01 17:48:22 +01:00
kevindehecker 6fafcaaae9 Gazebo in tudelft conf, with orange avoid example (#2149)
* Gazebo Cyberzoo and OrangeAvoid in tudelft conf, Simulate when no RC, call gzclient as tool
* [orange_avoider] color setting

* docs+remove modules section
2017-11-09 19:45:26 +01:00
Kirk Scheper e84ff368c2 Add rangesensor module (#2158)
* 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
2017-11-06 17:16:13 +01:00
Kirk Scheper 3bf4b8731d [nps] load aircraft into gazebo at run time + actuator handling (#2135)
* load aircraft into gazebo at run time + actuator handling

* Remove environment from airframe
2017-10-26 14:36:38 +02:00
Tom van Dijk 5a985ef691 Fix #2090 (#2122)
* 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.
2017-10-19 15:59:38 +02:00
kirkscheper e9ff78ad00 Fix optical flow nans when using feature management 2017-10-18 22:58:08 +02:00