Commit Graph

11440 Commits

Author SHA1 Message Date
Gautier Hattenberger 95a081c100 [imu] suggest to add default MAG neutral to pass some nps compilation
when MAG is not used in real ap target but still needed for nps
2019-10-15 23:03:27 +02:00
Gautier Hattenberger 9e01d190fa [fix] remove warning with default case 2019-10-15 23:03:27 +02:00
Gautier Hattenberger 0219156720 [bug] redundant definition of video device 2019-10-15 23:03:27 +02:00
Gautier Hattenberger 7cb51a8c21 [bug] missing parenthesis in mcu_can 2019-10-15 23:03:27 +02:00
Gautier Hattenberger f8efe8b008 [fix] bungee_takeoff was not turning motor on
Two issues:
- launch variable was not set to true which prevents the control to set
  throttle commad
- the autopilot_set_kill_throttle had not effects on fixedwing (in fact
  allows setting to true). We probably missed this because this function
  is mostly called to kill but not to resurect motor...
2019-10-10 18:52:19 +02:00
Gautier Hattenberger e583d169a8 [jevois] add option to send VISUAL_DETECTION ABI message from jevois detection 2019-10-09 09:31:16 +02:00
Gautier Hattenberger 6c8eea0447 [nav] configurable heading during rotorcraft survey 2019-10-09 09:31:16 +02:00
Gautier Hattenberger 350ef9ba59 [fixedwing] allow to trigger kill mode from RC 2019-10-09 09:31:16 +02:00
Gautier Hattenberger 8ad5e4b040 [board] add support of PWM on AUX and default mag i2c for Tawaki 2019-10-09 09:31:16 +02:00
Gautier Hattenberger ba283792a0 Bug fix imav2019 (#2462)
* [bug] fix takeoff detect

error in detection logic, introduced in #2319

* [bug] conf by name and id should not be 'property' methods

* [nps] don't send DL_VALUE message when datalink is disabled

* [rtcm] add timer between message sending to prevent buffer overflow

part of #2407 ongoing work but seems necessary for proper operation with
RTK modules
2019-10-08 10:33:01 -07:00
Gautier Hattenberger d5b1e62515 [module] add target_localization module (#2464)
Provide the position of a target on a flat ground based on detection
from a camera (VISUAL_DETECTION ABI message) and the current position
and orientation of the vehicle.
Developed and used during IMAV2019 competition.
2019-10-08 10:31:34 -07:00
OpenUAS 58deebc744 Update tfmini.c (#2460)
Tested with TFMini, now works correctly. Gain between 0..1 thus multiply not divide
2019-10-08 13:31:54 +02:00
Tom van Dijk 63805310d8 FIX usb_transparent STM32F4 GPIOA clock not enabled (#2461) 2019-10-04 15:39:17 -07:00
Fabien-B b3ad7fe5c7 [E-id-fr] Code formatting. 2019-08-29 15:20:08 +02:00
Fabien-B 37bb652590 [E-id-fr] Fix requested changes. 2019-08-29 15:20:08 +02:00
Fabien-B 2744cfb964 Add e-identification module. 2019-08-29 15:20:08 +02:00
Daniel Willemsen ca8c70ebea Created a default Bebop aircraft using opticflow and full INDI (#2458) 2019-08-28 23:38:50 +02:00
Murat Bronz 23b159b12b Filtering option added to SDP3X airspeed sensor (#2436)
* Filtering option added to SDP3X airspeed sensor
* Offset and Scale converted to 0 and 1
* AIRSPEED_SDP3X_ID abi msg id added
* AIRSPEED sent as ABI msg instead of directly setting the state interface
* Initialization of the autoset offset to false
2019-08-28 23:31:25 +02:00
Fabien-B 50d1e2eaaa Adds pointeur dereferencing keyword. Follow #2434. (#2443) 2019-08-28 23:20:18 +02:00
Gautier Hattenberger d13dafbf97 fix from codacy 2019-07-22 11:59:02 +02:00
Gautier Hattenberger 7e1fc732be [parrot] improve bebop scripts
old shell scripts are removed and replaced by python script similar to
ardrone2
it is possible to
- install and remove the autostart and network scripts
- configure autostart mode
- configure network to join a wifi router
- it is no longer need to modify the pprz.conf file before sending it to
  the drone
- the security options (AMODE) are not handled yet
2019-07-22 11:59:02 +02:00
Tom van Dijk 48e7b20789 TU Delft MAVLab course 2019 (#2452)
* Add video capture functionality to video_capture module

The video_capture module can now capture timestamped image-sequences
using the buttons or setting in the GCS. Images are stamped using
their capture pprz_ts, which can be synchronized with the csv file
logger (todo).

(video_capture) Add video capture functionality to video_capture module

(video_capture) name images with current timestamp

(video_capture) Log capture timestamp instead of current time

(video_capture) Minor XML fixes

(video_capture) Store pprz_ts-stamped images in boot-time-stamped folder

Stamping images with calender time does not make sense in simulation,
which has an independent clock that runs at a different rate, and
does not have any concept of a calender time.

* Minor usability tweaks to file logger

* XML changes and new gazebo worlds after collecting datasets

Flight plan for orange pole dataset

Add flightplan to fly towards textured panel

XML changes after collecting dataset

Revert video capture and stream to front camera

* FIX datalink timeout in NPS

* minor fix: make colorfilter's color_count volatile

Shared between video thread and autopilot thread, so should technically
be volatile (although it seemed to work already).

* updated orange avoider to module state machine and added simple guided mode example (#46)

* updated orange avoider to module state machine and added simple guided mode example

* Apply suggestions from code review

Co-Authored-By: kirkscheper <kirkscheper@gmail.com>

* add mutex and update guided to return to arena

* Minor fix: increase freq of WP_MOVED telemetry message

This makes the waypoint-based orange avoider example easier to
follow.

* minor readability tweak for file logger

* Enable video_capture by default, place before object detector

* Fix OpenCV inconsistencies in NPS, update to 3.4.5 (#47)

With this fix, the opencv example module will link the OpenCV lib from the bebop_opencv submodule rather than the locally installed one. This prevents inconsistent behavior between the real drone and the simulator; previously a bug in OpenCV caused U and V channels to be swapped depending on the installed version. The Bebop and sim now both use OpenCV 3.4.5.

Commits:

* FIX color loop error

Not exactly sure what went wrong, but this code works on both sim
and bebop without segfaulting. Note that the YUV channel order problem
still exists in this commit.

* YUV test function

* WIP SEGFAULT Try to upgrade opencv_bebop

This commit segfaults on the Bebop, caused by OpenCV's cvtColor
function (confirmed with printf and gdb). Might be caused by this:
https://github.com/opencv/opencv/issues/12176 .

* WIP Update opencv_bebop

* WIP get compilation working for nps

* WIP Clean up makefile, update conf LDFLAGS

* Restructure opencv_bebop makefile

Also update pprz because paths and ldflags have changed.

* Minor opencv_bebop makefile changes

* Fix YUV channel order

* FIX Consistent OpenCV behavior on drone and in NPS, OpenCV 3.4.5

With this fix, the opencv example module will link the OpenCV lib
from the bebop_opencv submodule rather than the locally installed one.
This prevents inconsistent behavior between the real drone and the simulator;
previously a bug in OpenCV caused U and V channels to be swapped depending
on the installed version. The Bebop and sim now both use OpenCV 3.4.5.

* update opencv_bebop

* Remove opencv demo module from course airframe

* Separate grayscale and color examples

* Add joystick xml for SM600

Joystick should be set in Reflex XTR mode. Tested on Ubuntu 16,
but not on 18 yet.

* Change sm600.xml to G3-G4.5 axis order

Reflex mode behaves differently between Ubuntu 16 and 18... :/

* Add OptiTrack distance measuring tool

Usage:
1. Connect through ethernet to OptiTrack pc.
2. In dist.py, change id number (line 19) to rigid body id to track.
3. Run dist.py
4. Results are not saved, copy manually.

dist.py was written by Shushuai Li.

* Made find_object_centroid documentation more comprehensive (#50)

* GPS coordinates of CyberZoo (#51)

* GPS coordinates of CyberZoo

Update GPS coordinates of the CyberZoo along the green carpet

* Update conf/flight_plans/tudelft/course2019_orangeavoid_cyberzoo.xml

* Update conf/flight_plans/tudelft/course2019_orangeavoid_cyberzoo.xml

* Fixed capitalisation in xbox controlled and added Turnigy controller (#52)

* Fixed capitalisation in xbox controlled and added Turnigy controller

 - Fixed capitalisation in conf/joystick/xbox_gamepad.xml

 - Added Turnigy controller conf/joystick/turnigy_evolution.xml

* Added a newbie friendly version of xbox_gamepad

The xbox controller both sticks have springs in both axis
and in the configuration of the xbox_gamepad.xml the yaw and throttle are on the same axis.
This configuration has the yaw on the triggers making for a more pleasant experience.

* FIX missing #endif in abi_sender_ids.h

* Update airframes to use bebop_cam module

TODO: retune, test and tag in cyberzoo

* Update opencv_bebop submodule to latest master

Also updated linked libraries in cv_opencvdemo module. Should
be re-tested on a clean system.

* Further cleanup for pull request

* Change sm600.xml throttle range

Throttle did not seem to behave correctly. Calibration only makes
things worse (incorrect ranges and lots of noise). The current xml
seems to work with an UNcalibrated joystick, with the trim sliders
in the middle (including throttle).

* Change default joystick to sm600.xml

* Revert sm600.xml range

* Re-tune camera

Camera settings were changed after bebop camera overhaul.

* Further tuning of green detector

* Tag aircraft after test flights

* FIX 'land here' incorrect capitalization

Changed back to lower case to maintain compatibility with other
flight plans that may not have been merged into master.

* FIX reduce WP_MOVED update rate

Avoidance code used waypoint_set_ functions instead of wp_move_,
which lacks the downlink message to update the wp position in the
GCS. Implemented the missing move functions and used these instead,
reduced the update rate of WP_MOVED to its original, low rate.

* FIX file_logger error message referring to video_capture

* FIX file_logger for fixed wing ac

* FIX sm600.xml missing newline

* WIP Cleanup opti_dist
2019-07-18 12:14:33 +01:00
Gautier Hattenberger 27057a37ab [fix] fix PWM7 index and disable pwm on SRVb connector by default 2019-07-09 11:23:50 +02:00
Hector Garcia de Marina 2289512bbb Merge pull request #2447 from enacuavlab/enac_student_projects-integration
Enac student projects integration
2019-07-08 18:19:00 +02:00
Gautier Hattenberger a7b05cf296 [fix] add some ref and set_integral function to PID lib 2019-07-08 16:05:09 +02:00
Gautier Hattenberger 7b2050a56f [fix] fix some DMA issues and motor pins for DShot on Tawaki (#2450)
also:
- activate the mag ahrs update by default
- use board not rotated by default
2019-07-06 10:10:21 +02:00
Fabien-B 096209b787 python paparazzi center tools impovement (#2445)
* [Python supervision] Change tool Menu. #2093

* [Python supervision] Adds tool icons.

* [Python supervision] Separates tools from control panel.

* [Python supervision] Adds blacklist feature.

* [Python supervision] Clean test code.

* [Python supervision] Allows tools override.

* [Python supervision] Removes useless constants.

* [Tools] Adds script to convert old xml tools format to the new one.

* [Python supervision] Handles new tools definition.

* Reduce diff with master

* [tools] adds reference to icons in tools xmls.
2019-07-05 15:45:45 +02:00
Gautier Hattenberger 11bd5f2793 missing include for bebop board 2019-07-01 13:14:21 +02:00
Gautier Hattenberger 4c05aaa704 [gps] fix PRIMARY_GPS check in precompile step 2019-07-01 13:14:21 +02:00
Gautier Hattenberger 69df254c26 [ins] INS invariant filter can use GPS heading instead of magneto 2019-07-01 13:14:21 +02:00
Gautier Hattenberger c8dba29208 [fix] typo and body_accel update 2019-07-01 13:04:44 +02:00
Gautier Hattenberger 57b4448205 [module] add shift_tracking module
This module is trying to track an axis based on a local position
estimate that can come from an UWB position system or a smart cam like
jevois for instance.
The control idea is to apply a shift around a reference trajectory that
should be close enough from the final desired path.
This was developped to help final approach for landing in a net. See
https://hal-enac.archives-ouvertes.fr/hal-01936955 for more information.
Also include a simple PID library (discrete or "continuous" form).
2019-07-01 12:49:58 +02:00
Gautier Hattenberger 407975cd8e [dw1000] integrate EKF and secondary GPS config
- dw1000_arduino module can now be used as local position system or as a
  GPS device
- the position can be filtered using a basic kinematic EKF, which also
  provides the velocity
- the GPS config allows to use it as primary/secondary GPS (use a
  regular GPS or indoor positioning as backup)
2019-07-01 12:33:34 +02:00
Gautier Hattenberger a2bca8b9f8 [jevois] update and fix jevois cam driver
- add report message
- fix parsing and sending bugs
2019-07-01 12:25:15 +02:00
Gautier Hattenberger 19c9b373bf [ahrs] configurable weighting band 2019-06-30 16:48:44 +02:00
Gautier Hattenberger 02a5d3961d [ahrs] add filter on accel heuristic of DCM AHRS
the same filter is already applied in the int_quat ahrs and can prevent
incorrect measurement rejection when strong structural vibrations
increase the IMU noise
2019-06-30 16:48:44 +02:00
Gautier Hattenberger 9c6bcf9f57 update chibios stable version for latest bug fix 2019-06-26 10:42:53 +02:00
Gautier Hattenberger 17c3dd17fe [tawaki] fix RTC conf for Tawaki board 2019-06-26 10:42:53 +02:00
Matteo Barbera 8c145b7e49 Improvement to start.py maintenance tools (#2438)
* Added last commit dates to lists of untested flight plans and airframes

* Improved paparazzi_health to include a list of all modules and their usage

* improved paparazzi_health to include a list of board makefiles not used by any airframe

* improved paparazzi_health to generate list of unused airframes, flightplans and boards sorted by most recently changed

* airframe details now stores modules as tuple of name and type: [(name, type), ...]

* added seeing includes in paparazzi_health

* Removed unneccesary print statements

* Added widget to start.py to generate html table of the module usage of the airframes for the selected conf

* improved html table readability and sorted airframe names alphabetically

* fixed alphabetical ordering of airframe name being case sensitive and added comments

* Added module class, more info about modules now gets printed. Commit dates should still be fixed

* Did speed improvement, but still slow

* split up more info and lists of untested files

* Added checkboxes to start.py to give user option to show airframe detail, or untested files, or both

* Cleaned up some code

* Added separator to make link between checkboxes and MoreInfo button clearer

* Fixed code style

* Added description to the module listing

* one should now be able to select which aspects to show in the maintenance tools

* Initial version of maintenance tools window

* Now also checks if modules are mentioned in the settings modules in an userconf

* Improved layout of maintenance tool window

* Improved variable names and tooltip information

* Small QoL changes to prepare for pull request

* Fixed a bug with the untested boards not showing correctly if airframes was not also selected and fixed some Codacy issues

* Added functionality to generate module overview by board name

* Module overview table now also displays the xml file and of the airframe

* Update health_monitor_update branch with master changes

* Bug-fixes and added description to maintenance tools
2019-06-24 21:56:14 +02:00
Gautier Hattenberger 208c37bc98 [module] WS2812 led module (#2435)
Using the ChibiOS DMA driver
2019-06-19 10:00:13 +02:00
Gautier Hattenberger 17b185d4b2 Merge pull request #2419 from paparazzi/tawaki_board-integration
Tawaki board integration
2019-06-19 09:43:46 +02:00
Gautier Hattenberger 4d7045d6ff [python] fix natnet3 speed filter
previously, only the last computed speed was return in the end,
regardless of the filter option (number of points to use)
2019-06-18 19:16:06 +02:00
Gautier Hattenberger 8f4b107ad2 [python] add small tool to get A/C conf from server (#2431)
This is providing the init sequence as done by the GCS to get and
maintain the list of aircraft known by the server and their
configurations
2019-06-18 18:34:02 +02:00
Alexis Cornard 281116f797 LSM6DS33 (gyro/accel) and LPS25H (baro) drivers (#2437) 2019-06-18 17:27:54 +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
Gautier Hattenberger c93a84e768 [chibios] fix LED_ON/OFF to take board conf into account 2019-06-14 10:36:07 +02:00
Gautier Hattenberger d6765a5a93 [board] add new board TAWAKI
based on STM32F7 with ChibiOS
2019-06-14 10:15:54 +02:00
Gautier Hattenberger 949d88e822 small corrections for baro bmp and sd log 2019-06-14 10:15:54 +02:00
Gautier Hattenberger 698bd24853 [imu] add support of ICM imu sensors to the mpu60x0 driver
register map is almost the same, the WHO_I_AM value can tell which
sensor is being used
2019-06-14 10:15:54 +02:00
Gautier Hattenberger db991f402f [mcu] add support for I2C4 and SPI4 2019-06-14 10:15:54 +02:00