UCI-UAVForge / Avionics-16-17

1 stars 13 forks source link

Research ArduPilot Codebase and Identify Critical Components #112

Open uavforge opened 7 years ago

uavforge commented 7 years ago

Prerequisite Issues: N/A Followup Issues: TBD Related Issues: N/A

Summary

Identify critical components in the ArduPilot codebase such as variables for GPS coordinates, motor spin rate, pitch, etc. and verify that they are able to be formatted and packaged for transmission to Ground Station.

Terminal Objectives

Enabling Objectives

elliotrh commented 7 years ago

GPS variables under Copter.h: lines 345-357

Kentster82 commented 7 years ago

copter.h lines 446-452 variables for altitude.

barbarm commented 7 years ago

avoidance_adsb.h lines 32-39

// vertical avoidance handler
bool handle_avoidance_vertical(const AP_Avoidance::Obstacle *obstacle, bool allow_mode_change);

// horizontal avoidance handler
bool handle_avoidance_horizontal(const AP_Avoidance::Obstacle *obstacle, bool allow_mode_change);

// perpendicular (3 dimensional) avoidance handler
bool handle_avoidance_perpendicular(const AP_Avoidance::Obstacle *obstacle, bool allow_mode_change);
barbarm commented 7 years ago

UserVariables.h WiiCamera variables

int WiiDisplacementX=0; int WiiDisplacementY=0;

elliotrh commented 7 years ago

defines.h Autopilot Yaw Mode enumeration 14-21 auto pilot mode enumeration lines 87-126 Tuning enumeration lines 129-170

elliotrh commented 7 years ago

need to check control_stabilize.cpp and control_acro.cpp for autopilot flight modes

barbarm commented 7 years ago

Copter::auto_run() inside control_auto.cpp

auto_takeoff_run() auto_wp_run() auto_land_run() auto_rtl_run() auto_circle_run() auto_spline_run() auto_nav_guided_run() auto_loiter_run() auto_payload_place_run()

elliotrh commented 7 years ago

in control_althold.cpp

line 36 Copter::althold_run() -initializes vertical speeds and acceleration -yaw rate and climb rate -switches between althold states (takeoff, flying, landing) -apply avoidance

uavforge commented 7 years ago

ardupilot/libraries/RC_Channel/RC_Channel.h - handles RC inputs (radio controller) ardupilot/libraries/AC_AttitudeControl/AC_PosControl.h - handles position control? (needs check)

IMPORTANT: Attitude.cpp (some function definitions for Copter.h) - contains RC input conversions into pitch/roll/yaw rates, and set/get/update rates for flight control

control_auto.cpp and control_loiter.cpp has flight mode definitions Auto and Loiter

get_control_in() - records pilot input for channel_pitch, channel_roll, channel_yaw

1D LIDAR connection functional - look at sonarrange variable under Status tab (Mission Planner)

haritdesai commented 7 years ago

ardupilot/libraries/AP_Param/AP_Param.h

File specifies functions to set and find variables in ROM, can use for checking sensor values.

haritdesai commented 7 years ago

http://ardupilot.org/copter/docs/parameters.html#serial2-protocol

RNGFND_FUNCTION: Rangefinder Function

Input: Value that determines distance type (0-Linear, 1-Inverted, 2-Hyperbolic) Output: Returns Distance in meters

Relevance:

In Ardupilot, RangeFinder mode is determined by enum, ie 0-LidarLite, 1-HokuyoLidar, etc. The RNGFND_FUNCTION seems to return the distance given by that rangefinder, in our case the LidarLite, which should correspond to the "sonarrange" variable in mission planner.

Seems like the next best place to look to track down the lidar functionality in ArduPilot.