Gathiyo / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Traditional heli HIL simulation not holding altitude in auto mode #323

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Arducoper NG or ACM?
ACM

What steps will reproduce the problem?
1.Set up HIL simulation with traditional heli software and Aerosim RC per 
posted instructions. Connect and start the simulation plugin.
2.Select any set of waypoints in the mission planner based on the home location 
generated by the simulation. Make sure to set a desired altitude for each 
waypoint, or set a default altitude. Upload flight plan.
3.Set mode to auto in flight planner.

What is the expected output? What do you see instead?
Expected behavior is heli flies waypoints, maintaining desired altitudes. 

Actual behavior is that little if any control is applied to the collective at 
all. Depending on the simulator authority setting for throttle, the heli either 
ascends indefinitely, or descends until it lands or crashes. This can be 
verified by viewing the outputs in the simulation tab. 

What version of the product are you using? On what operating system?
APM 1.1.26 on Windows 7 ultimate 64-bit, 

ArduCopter 2.2b, slightly modified using the Arduino Environment to operate on 
a barebones Arduino Mega 2560 (per Mick's instructions). CLI and logging are 
disabled so that the software doesn't expect the absent hardware to be there.

Please provide any additional information below.

Setting the simulator authority for throttle in the simulation tab will change 
the value of the output, and collective can be controlled normally in stabilize 
mode, which implies that the inputs are correctly mapped within the 
communications protocols.

Something was mentioned about the barometer not being automatically initialized 
in the software. Per this conversation, I manually added the commands into 
Mavlink to initialize the barometer, assuming that the lack of control was 
caused by the ArduCopter ignoring altitude inputs because the barometer hadn't 
been initialized. Running the command through Mavlink with the heli on the 
ground in simulation did not correct the problem.

My guess is that there is a disconnect between the info coming from Aerosim, 
and the ArduCopter software. The information passes properly into the GCS from 
Aerosim(verified by the accurate altitude displayed on the artificial horizon 
in the flight planner). There's something about how the ArduCopter is accepting 
that simulated altitude data that seems to be causing the problem.

Original issue reported on code.google.com by lyu...@gmail.com on 1 Feb 2012 at 1:33

GoogleCodeExporter commented 8 years ago
Here is the conversation regarding initializing the barometer.
http://www.diydrones.com/group/arducopter-traditional-heli-user-group/forum/topi
cs/pid-settings-for-tradi-heli-1

Original comment by lyu...@gmail.com on 1 Feb 2012 at 1:36

GoogleCodeExporter commented 8 years ago
Update:

Somewhere in the code, a control is reversed.

The Mavlink command doesn't seem to properly initialize the barometer when 
modofied in accordance with the previously linked discussion. However, the 
barometer does seem to properly initialize and function when the traditional 
method of arming is performed (pulling throttle to minimum and rudder to hard 
left and holding).

Now, the controller adjusts the collective with respect to altitude.

There's just one problem. The input is reversed. It runs away from the target 
altitude.

The fix I employed was to set the authority for throttle in the sim tab to a 
negative value (-400), instead of the usual positive value. Using this setting, 
the autopilot functions as intended in auto mode.

Original comment by lyu...@gmail.com on 1 Feb 2012 at 2:08

GoogleCodeExporter commented 8 years ago
I really can't recreate this issue.  It flies totally fine in aerosimrc when I 
try it.  We've got a new release coming out in about a week and i'll certainly 
test it then but...really, i've never seen this issue.

Original comment by rmackay...@gmail.com on 14 Feb 2012 at 1:43