Commit Graph

1316 Commits

Author SHA1 Message Date
Andrew Tridgell d57f307032 Rover: use cork/push wrapper 2017-11-21 14:10:54 +11:00
Peter Barker c00a4f3bb2 Rover: AP_Camera uses GPS singleton 2017-11-16 15:28:37 +00:00
Peter Barker baf82cec22 Rover: use gps singleton for GCS functions 2017-11-15 13:43:03 +00:00
khancyr c08203de17 Rover: allow pivot turn in STEERING mode 2017-11-15 13:46:58 +09:00
André Kjellstrup aab22d7dad Rover: Option to trig by distance only when in AUTO mode 2017-11-14 00:10:22 +00:00
Randy Mackay 7e2214c2be Rover: simplify logic for lateral-accel override during use-pivot-steering
It was theoretically possible that the lateral-acceleration would not be overwritten if the yaw-error-cd was exactly zero
2017-11-08 17:15:59 +09:00
khancyr 2b0645d6a1 Rover: get_throttle_out calls do not require skid-steering arg 2017-11-08 15:45:43 +09:00
Daniel Widmann bc7cf97b4e Rover: don't use GPS speed to detect reversing
instead pass reverse to attitude controller based on desired speed
2017-11-08 14:37:59 +09:00
Daniel Widmann ac7e76cc43 Rover: enable pivot turns in auto mode 2017-11-08 14:35:00 +09:00
Pierre Kancir 4d38eb85a1 APMRover2: Add support of MANUAL_CONTROL msg 2017-10-31 09:31:05 +09:00
Randy Mackay 7fb4f17ad9 Rover: 3.2.0-rc2 release notes 2017-10-28 15:16:11 +09:00
Peter Barker 2d0a23fcc8 Rover: call ins's periodic function 2017-10-27 16:33:45 +11:00
khancyr 74d5767e25 Rover: Fix slew rate range 2017-10-26 19:44:43 +09:00
Randy Mackay 2ef1e8e4c2 Rover: fix PID desired and achieved reporting 2017-10-26 19:44:18 +09:00
Randy Mackay ea70755f00 Rover: fix speed nudge
fix bug when target speed was exactly zero which caused nudge to be a large negative value
2017-10-26 19:44:07 +09:00
Randy Mackay fb9f695d2f Rover: fix use-pivot-steering
absolute yaw error should be used
2017-10-26 19:43:55 +09:00
Randy Mackay fb944322c7 Rover: minor fix to disarm logic
check should use logical and instead of bitwise and
2017-10-26 19:43:48 +09:00
Randy Mackay 2c568f8046 Rover: minor parameter description change
non-functional change
2017-10-26 19:43:42 +09:00
Randy Mackay 9f67d2a88d Rover: add MOT_SKID_FRIC to up skid-steer motor out while stopped 2017-10-26 19:43:36 +09:00
Tom Pittenger f7d07fc146 Rover: always log MODE and include reason when logging is enabled 2017-10-25 21:18:29 +11:00
Andrew Tridgell f25e8631ef Rover: support simple accelcal 2017-10-10 10:57:38 +11:00
Michael du Breuil 4f83d39b5e Rover: Report GPS health 2017-09-27 19:29:32 +01:00
Lucas De Marchi e98ccb9ae6 ArduRover: use static method to construct controllers 2017-09-26 03:01:21 +01:00
Lucas De Marchi bfd13dfe87 global: use static method to construct AP_AHRS_DCM 2017-09-26 03:01:21 +01:00
Lucas De Marchi beabae6a98 global: use static method to construct AP_AHRS_NavEKF 2017-09-26 03:01:21 +01:00
Lucas De Marchi c9fbf7b722 global: use static method to construct AP_NavEKF3 2017-09-26 03:01:21 +01:00
Lucas De Marchi e2fe36357a global: use static method to construct AP_NavEKF2 2017-09-26 03:01:21 +01:00
Lucas De Marchi eadd650d78 global: use static method to construct AP_RSSI 2017-09-26 03:01:21 +01:00
Lucas De Marchi 18aa88b329 global: use static method to construct AP_Mount 2017-09-26 03:01:21 +01:00
Lucas De Marchi c3647f0185 global: use static method to construct AP_Camera 2017-09-26 03:01:21 +01:00
Lucas De Marchi cc53e7bc4b global: use static method to construct AP_ServoRelayEvents 2017-09-26 03:01:21 +01:00
Lucas De Marchi 13d7f58036 global: use static method to construct AP_Relay 2017-09-26 03:01:21 +01:00
Lucas De Marchi 9ce6019138 global: use static method to construct AP_Frsky_Telem 2017-09-26 03:01:21 +01:00
Lucas De Marchi b022c02029 global: use static method to construct AP_BattMonitor 2017-09-26 03:01:21 +01:00
Lucas De Marchi 69b6d95cb2 global: use static method to construct AP_Board_Config{,_CAN} 2017-09-26 03:01:21 +01:00
Lucas De Marchi a74e700006 global: use static method to construct RCMapper 2017-09-26 03:01:21 +01:00
Lucas De Marchi 72fd2d6f05 global: use static method to construct AP_SerialManager 2017-09-26 03:01:21 +01:00
Lucas De Marchi fbe0d9761c global: use static method to construct AP_OpticalFlow 2017-09-26 03:01:21 +01:00
Lucas De Marchi 5ec1430726 APMrover2: use static method to construct AP_Arming_Rover 2017-09-26 03:01:21 +01:00
Lucas De Marchi b36a5919f5 global: use static method to construct AP_Mission
This also move the initialization to be in the header for those that
weren't already to maintain consistency.
2017-09-26 03:01:21 +01:00
Lucas De Marchi 40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Lucas De Marchi 9027a55696 global: use static method to construct RangeFinder 2017-09-26 03:01:21 +01:00
Lucas De Marchi f5c2ffffb9 global: remove DataFlash from AP_Mount::init() 2017-09-26 03:01:21 +01:00
Lucas De Marchi 53c82b4aaf global: use static method to construct DataFlash_Class 2017-09-26 03:01:21 +01:00
Lucas De Marchi 62ac0ab8aa global: use static method to construct AP_Notify 2017-09-26 03:01:21 +01:00
Lucas De Marchi de680dac5b global: use static method to construct AP_Scheduler 2017-09-26 03:01:21 +01:00
Lucas De Marchi 8094482f21 global: use static method to construct AP_GPS 2017-09-26 03:01:21 +01:00
Lucas De Marchi 87b30b4552 global: use static method to construct AP_InertialSensor 2017-09-26 03:01:21 +01:00
Lucas De Marchi c1a957fbf3 global: use static method to construct Compass 2017-09-26 03:01:21 +01:00
Lucas De Marchi 91feec0e14 global: use static method to construct AP_Baro 2017-09-26 03:01:21 +01:00
Lucas De Marchi ad05e0a643 APMrover2: protect version.h from inclusion and use ap_version.h 2017-09-23 21:37:45 -07:00
Lucas De Marchi 27be369be7 APMrover2: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 0c49b7a973 APMrover2: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Randy Mackay 3af5893f9e Rover: command-long DO_SET_HOME check first param is zero 2017-09-20 12:14:38 +09:00
Randy Mackay f7cb006d40 Rover: accept DO_SET_HOME within COMMAND_INT 2017-09-20 12:14:38 +09:00
Randy Mackay b1684b5377 Rover: accept more mav-frame types
accept mav frames whether or not they have _INT appended
2017-09-20 12:14:38 +09:00
Peter Barker b84e40a804 Rover: move handling of SET_GPS_GLOBAL_ORIGIN up 2017-09-19 15:44:23 +09:00
Randy Mackay 4899401679 Rover: minor comment fix 2017-09-19 10:30:15 +09:00
Randy Mackay de406da254 Rover: set home using EKF position
previously the home position could be set from DCM
This makes the setting of home slower but more accurate
2017-09-19 10:30:15 +09:00
Randy Mackay 894bf2a23f Rover: support SET_GPS_GLOBAL_ORIGIN message 2017-09-19 10:30:15 +09:00
Peter Barker add5eb6907 Rover: remove old DO_SET_MODE support
We no longer support setting modes except via custom-modes
2017-09-19 01:24:11 +01:00
Peter Barker 25a32c93f2 Rover: move gcs_out_of_time into GCS object 2017-09-12 18:28:07 +01:00
Peter Barker b5d234aa64 Rover: handle param_request_list in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker 640b2b7a13 Rover: handle param_set in GCS_MAVLINK base class 2017-08-30 15:54:47 +01:00
Peter Barker 85ac69f701 Rover: move send_autopilot_request calls up to GCS base class 2017-08-30 15:54:46 +01:00
Peter Barker d98c427514 Rover: add constant structure holding firmware version 2017-08-30 15:54:46 +01:00
khancyr 2be28ddb1e Rover: fixup cpu failsafe
remove copying of rc input to servo output
disarm after 2 seconds
2017-08-26 13:13:18 +09:00
Randy Mackay d525c0bffb Rover: 3.2.0-rc1 release notes 2017-08-25 14:50:48 +09:00
Randy Mackay 78a5e4500f Rover: send GCS warning when cruise learning fails to start
Also const-ified some variables, added some brackets and comments
2017-08-25 14:05:23 +09:00
Randy Mackay 1600823b12 Rover: aux switch to learn cruise throttle and speed 2017-08-25 14:05:23 +09:00
Randy Mackay 14c74a5967 Rover: remove learning mode
saving waypoints can be done in manual or steering mode
2017-08-25 14:05:23 +09:00
Randy Mackay 524fe4cd82 Rover: aux switch saves waypoint in manual or steering modes
Also refactor aux switch methods
rename LEARN_CH to AUX_CH
2017-08-25 14:05:23 +09:00
Randy Mackay 3adfb0e77d Rover: replace int with uint8_t
non-functional change
2017-08-25 14:05:23 +09:00
Randy Mackay 82e61d7198 Rover: remove unused throttle_failsafe_active method 2017-08-25 14:05:23 +09:00
khancyr 4ab11027a7 Rover: remove unused mavlink_delay(uint32_t ms) 2017-08-24 20:41:16 +09:00
khancyr 4c977f16ce Rover: reduce ADC warm up time 2017-08-24 20:41:16 +09:00
khancyr 2f1cc5ddfc Rover: support brushed motor on normal rover 2017-08-24 20:09:47 +09:00
khancyr 25b1307400 Rover: solve servo reverse in brushed configuration 2017-08-24 20:05:27 +09:00
Peter Barker 4fc31cf80d Rover: add ArduSub to list of SYSID_SW_TYPE 2017-08-24 19:50:38 +09:00
Randy Mackay 7a37a7f921 Rover: integrate simpler Log_Write_EKF 2017-08-23 11:19:14 +09:00
Randy Mackay 3f1271214e Rover: rename MotorsUGV pwm type to brush-with-relay 2017-08-22 10:09:13 +09:00
khancyr 46e6057493 Rover: solve servo reverse in brushed configuration 2017-08-22 10:09:10 +09:00
Peter Barker ee39ec3751 Rover: move serial_control case to base class 2017-08-17 12:42:31 +01:00
Peter Barker 92becb2875 Rover: move play_tune and led_control handling to base class 2017-08-17 12:27:10 +01:00
Randy Mackay bbb1329116 Rover: remove unused definitions 2017-08-17 11:58:07 +09:00
khancyr 2ceb29e9da Rover: use abs for int within calc_speed_nudge
same issue resoled for log-write-nav-tuning
2017-08-17 09:46:56 +09:00
khancyr ed19db7188 Rover: set_mode arg name to match implementation
definition and implementation used different argument name
2017-08-17 09:46:19 +09:00
khancyr a035950a22 Rover: minor format fix 2017-08-17 09:45:49 +09:00
khancyr 58b643c458 Rover: replace divide with multiply in calc_throttle
non functional change
2017-08-17 09:45:21 +09:00
Randy Mackay 6eceaef484 Rover: remove redundant SYS_NUM_RESETS
this is handled by AP_Stats library
2017-08-17 09:39:40 +09:00
Randy Mackay e2d4182c75 Rover: fix parameter conversion 2017-08-17 09:39:40 +09:00
Randy Mackay c9927e6af6 Rover: bug fix to steering mode top speed
Also non-functional change to calc_throttle to make call to calc_speed_nudge consistent
2017-08-17 09:39:40 +09:00
Randy Mackay 167a856cdb Rover: remove THR_MIN, THR_MAX parameters from vehicle
enforcing these limits is now handled by AP_MotorsUGV class
2017-08-17 09:39:40 +09:00
Randy Mackay c0fe1b7ec8 AP_MotorsUGV: minor comment fix 2017-08-17 09:39:40 +09:00
Randy Mackay c8eceeabb6 AP_MotorsUGV: add THR_MIN, THR_MAX parameters 2017-08-17 09:39:40 +09:00
Randy Mackay c61f965828 AP_MotorsUGV: re-order implementation to match declaration
non-functional change
2017-08-17 09:39:40 +09:00
Peter Barker f3a0d2b02b Rover: use GCS_MAVLINK subclasses to handle set_mode 2017-08-16 11:58:10 +10:00
Grant Morphett 2463bfd2ec Rover: fix SITL Make build on Windows
PE linker can't remove unused methods so we add the necessary libraries
2017-08-15 21:51:13 +01:00
Peter Barker 4c2747bfe8 Rover: use rangefinder backend accessors 2017-08-15 18:30:45 +01:00
Michael du Breuil a98c8427dd Rover: Expose the AFS instance to MAVLink 2017-08-15 15:14:56 +01:00
Randy Mackay 348dbdaf22 Rover: fix do-nav-wp comment 2017-08-15 20:47:19 +09:00
Randy Mackay 57b2b02509 Rover: remove out-of-date comment 2017-08-15 20:47:19 +09:00
Randy Mackay 492fe40f93 Rover: re-organise private member declarations
declarations are grouped by file (which are in turn organised alphabetically) and in the order they appear within each file
non-functional change
2017-08-15 20:47:19 +09:00
Randy Mackay 6c7db05207 Rover: re-organise includes
non-functional change
2017-08-15 20:47:19 +09:00
Randy Mackay 06a7e46447 Rover: remove PID from build 2017-08-15 20:47:19 +09:00
Randy Mackay 95c5ada3e9 Rover: modes use stop_vehicle to stop gently
modes slow to a stop instead of immediately setting motors to zero
vehicle centers steering when stopping
2017-08-15 20:47:19 +09:00
Randy Mackay 0b917cfd36 Rover: mode auto guided and rtl slow before destination
new mode class member _desired_speed_final holds target speed at destination

main vehicle code passes heading to next waypoint into auto mode.
we do not provide heading when delaying at waypoint which signals we wish

auto-mode calculates final speed at destination which allows vehicle to
make turn within value of WP_OVERSHOOT parameter assuming vehicle turns at
maximum lateral acceleration.
2017-08-15 20:47:19 +09:00
Randy Mackay d99108f3bc Rover: use AR_AttitudeControl for throttle control
also direct throttle nudge replaced with speed nudge
calc_speed_max estimates vehicle's top speed based on cruise-speed and
cruise-throttle
steering mode now provides total target speed instead of using speed plug
throttle nudge
motor limits provided to attitude control to stop i-term buildup
uses negative desired speed instead of reversed flag
reporting to GCS uses new throttle controller
braking is simply enabled and allows a reverse motor output regardless of vehicle
speed
2017-08-15 20:47:19 +09:00
Randy Mackay 61d1ced7aa Rover: add turn radius param for steering mode
removes reliance on old steerController
2017-08-15 20:47:19 +09:00
Randy Mackay 9097269d6d Rover: use AR_AttitudeControl for steering control 2017-08-15 20:47:19 +09:00
Randy Mackay c56d8cb6b1 Rover: add AC_PID and AR_AttitudeControl to build 2017-08-15 20:47:19 +09:00
Randy Mackay a5783939ef AP_MotorsUGV: add limit flags
These flags become true when the steering servo or motors hit their
limits.  used to stop I-term build-up in higher level controllers.
2017-08-15 20:47:19 +09:00
Peter Barker fa2b500e93 Rover: remove CLI 2017-08-14 10:23:50 +09:00
Randy Mackay 59a1f260d1 Rover: remove unused compat.h 2017-08-12 14:46:46 +09:00
Randy Mackay b895da64e1 Rover: minor comment fix to parameters list 2017-08-12 14:46:19 +09:00
Randy Mackay e79e92a789 Rover: remove unused SPEED_TURN_DIST parameter 2017-08-12 13:58:35 +09:00
Randy Mackay 28d74722bd AP_MotorsUGV: minor formatting fix 2017-08-12 13:34:27 +09:00
Randy Mackay bff74115bc Rover: remove unused distance_past_wp 2017-08-12 13:05:01 +09:00
Randy Mackay a00c7e0acb Rover: mode calc_reduced_speed_for_turn gets some const for local variables 2017-08-12 12:29:13 +09:00
Randy Mackay 66bb3e8ee0 Rover: minor formatting fix to parameters.cpp 2017-08-12 12:14:54 +09:00
Peter Barker edab526b01 Rover: send gps messages as separate queued messages 2017-08-09 16:18:22 +01:00
Peter Barker f7fd663f45 Rover: move sending of gps_raw up 2017-08-09 16:18:22 +01:00
Peter Barker 89a5272ab5 Rover: move sending of system_time up 2017-08-09 16:18:22 +01:00
Peter Barker 341a9ae032 Rover: move sending of camera_feedback up 2017-08-09 16:18:22 +01:00
Peter Barker ece800ba90 Rover: move sending of meminfo up 2017-08-09 16:18:22 +01:00
Peter Barker c642dc616a Rover: use new retry_deferred method 2017-08-05 23:14:18 +01:00
khancyr 6b429bd372 Rover: remove redundant GPS check before camera update
this same check is included within AP_Camera
2017-08-05 17:05:19 +09:00
khancyr 7c3374668e Rover: formatting fixes and const local variables 2017-08-05 17:05:00 +09:00
khancyr 848df551ac Rover: formatting and comment fixes to mode class 2017-08-05 17:02:52 +09:00
Randy Mackay efc790a84a Rover: add comment to mode 2017-08-05 11:20:58 +09:00
Randy Mackay 30852d4713 Rover: auto-reversed moved to mode 2017-08-05 11:20:58 +09:00
Randy Mackay 4f5e82f406 Rover: mode fixes for reversing 2017-08-05 11:20:58 +09:00
Randy Mackay 66f1437e4f Rover: remove unused throttle variable 2017-08-05 11:20:58 +09:00
Randy Mackay 1e8e3609c6 Rover: remove duplicate setting of ground_speed
update_ahrs already does this using a slightly different method, having both likely leads to small twitches in ground speed at 10hz
2017-08-05 11:20:58 +09:00
Randy Mackay e88b1572b6 Rover: remove navigate 2017-08-05 11:20:58 +09:00
Randy Mackay fe6465b748 Rover: remove next_WP, wp_distance, navigate
Also remove prev_WP, wp_totalDistance which are all handled within mode class
2017-08-05 11:20:58 +09:00
Randy Mackay b4af441eb9 Rover: remove unused update_navigation 2017-08-05 11:20:58 +09:00
Randy Mackay 2640ec9ed9 Rover: rename update_commands to update_mission 2017-08-05 11:20:58 +09:00
Randy Mackay 56b0621994 Rover: verify_RTL calls rtl mode
also remove unused rtl_complete
2017-08-05 11:20:58 +09:00
Randy Mackay 1b19ee865d Rover: remove active-loiter and set-auto-wp
these are now handled by auto mode
2017-08-05 11:20:58 +09:00
Randy Mackay 974453607e Rover: replace do-yaw with nav-set-yaw-speed 2017-08-05 11:20:58 +09:00
Randy Mackay 27e833ebd1 Rover: verify_within_distance gets distance directly from auto mode 2017-08-05 11:20:58 +09:00
Randy Mackay 3863542194 Rover: adjust set-position-target-local-ned handling
add support for just yaw or yaw-rate
remove support for simultaneous position and velocity
2017-08-05 11:20:58 +09:00
Randy Mackay 46faece76b Rover: set-attitude-target accepts quaternions for target heading 2017-08-05 11:20:58 +09:00
Randy Mackay d56d222971 Rover: set-attitude-target consumes thrust in -1 to +1 range
This makes the processing consistent with the mavlink spec
2017-08-05 11:20:58 +09:00
Randy Mackay b9db9229d9 Rover: replace vehicle code guided methods with calls to guided mode class
set_guided_WP replaced by mode_guided.set_desired_location
nav_set_yaw_speed replaced with mode_guided.set_desired_heading_and_speed
set_guided_velocity replaced with mode_guided.set_desired_turn_rate_and_speed
guided_control structure replaced with mode_guided members
use_pivot_steering accepts yaw-error argument instead of calculating it itself internally
2017-08-05 11:20:58 +09:00
Randy Mackay 783f8243df Rover: use mode class's get_distance_to_destination and speed_error
used for reporting to GCS and logging
2017-08-05 11:20:58 +09:00
Randy Mackay f71db5ae05 Rover: rtl mode refactoring
slow down for turns
2017-08-05 11:20:58 +09:00
Randy Mackay 946a0a8e54 Rover: guided mode refactoring
add set-desired methods
add get_distance_to_destination
fix to one interation with no update to motors
slow down for turns
2017-08-05 11:20:58 +09:00
Randy Mackay 279491ed20 Rover: auto mode refactoring
updating mission is handled by the vehicle code
slows down for turns
add active at destination
remove setting of loiter start time
removes unused calc_nav_steer
2017-08-05 11:20:58 +09:00