Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M4 test plan #42

Closed
caguero opened this issue Oct 6, 2021 · 2 comments
Closed

M4 test plan #42

caguero opened this issue Oct 6, 2021 · 2 comments

Comments

@caguero
Copy link
Collaborator

caguero commented Oct 6, 2021

No description provided.

@braanan
Copy link
Collaborator

braanan commented Oct 29, 2021

@mabelzhang @chapulina @caguero
Hi Mabel and Louise,

I just committed a new mission to master that I hope will help with debugging. The mission is called RegressionTests/IgnitionTests/testAct.xml.

Instead of creating a mission file for each test case, testAct.xml exposes mission arguments that will allow you to command any actuator to a position (or speed in the case of the thruster).

What does the mission do?

This mission commands the vehicle actuators to a specified position/velocity and time duration. Once started, the mission will move any commanded actuators to the specified pos and hold them there until the mission timeout expires. The mission commands the actuators directly, so no pitch/depth commands or controller code are running the loop.

I annotated the mission file, but basically all the mission does is:

  1. Run vehicle behaviors in parallel to command each one of the vehicle's actuators.
  2. Run a blocking "Wait" behavior (in sequence) to wait until the timeout expires.

The mission takes in a number of arguments (that have default values that I thought made sense).

Mission args:

  • MissionTimeout: Determines the total duration of the mission in minutes. I defaulted the value to 45 min to allow the vehicle to reach steady-state in some test cases but the timeout could be shortened if needed.

  • Speed: Static setting for speed during the mission (meter_per_second; 1 m/s = 300 RPM). Default is 0 m/s.

  • MassPosition: Static setting for mass position during the mission (millimeter). Defaults to the VerticalControl.massDefault setting in the Config/Control.cfg file.

      NOTE: Commanded values should fall between the permitted cofig range as defined by:
          - VerticalControl.massPositionLimitFwd  // Forward limit default is 30 mm (toward nose = positive)
          - VerticalControl.massPositionLimitAft  // Backward limit default is -30 mm (toward tail = negative)
    
  • BuoyancyPosition: Static setting for buoyancy position during the mission (cubic_centimeter). Defaults to
    VerticalControl.buoyancyNeutral setting in the Config/Control.cfg file.

      NOTE: Commanded values should fall between the permitted cofig range as defined by:
      - VerticalControl.buoyancyLimitHiCC  // High limit 955 cc (max bouncy)
      - VerticalControl.buoyancyLimitLoCC  // Low limit   80  cc (min bouncy)
    
  • RudderAngle: Static setting for rudder angle during the mission (degrees). Defaults to center (0 deg).

      NOTE:
      Max value:  15 degrees, turns rudder to stbd, turn vehicle nose to port
      Max value: -15 degrees, turns rudder to port, turn vehicle nose to stbd
    
  • ElevatorAngle: Static setting for elevator angle during the mission (degrees). Defaults to center (0 deg).

      NOTE:
      Max value:  15 degrees, turn elevator up, pitch vehicle nose down (pitch < 0)
      Max value: -15 degrees, turn elevator down, pitch vehicle nose up (pitch > 0)
    

How to use?

Here are some examples of how to run the test mission directly from the command line and have the app quit once the mission is complete:

Hold the mass-shifter at 20 mm for 45 min:

./bin/LRAUV -x "load RegressionTests/IgnitionTests/testAct.xml;set testAct.MassPosition 20 mm;run quitAtEnd"

Hold the rudder at 12 degrees and thrust forward at 1 m/s for 45 min:

./bin/LRAUV -x "load RegressionTests/IgnitionTests/testAct.xml;set testAct.RudderAngle 12 degree;set testAct.Speed 1 m/s;run quitAtEnd"

These commands can be also used directly from the lrauv-app command line.

What to expect?

For starters, I ran the test mission using the MBARI sim and set it to hold the mass at 20 mm at a speed of 0 m/s; that's it — all other actuators are held at their default poses.

A few things to note:

  • The MBARI sim runs a startup test that includes moving the mass, elevators, and rudders when the app comes up (you can see that in the plot at the start of the time-series).
  • In the sim run the vehicle settled at ~12 m depth — that's because the sim dynamically incorporates water density in the buoyancy calculation, so at the start of the mission the vehicle sinks until the vehicle reaches density equilibrium with the water.
  • In the sim run the vehicle settled at a pitch angle of roughly -35 degrees.

Here's what that looks like:

test_act_mass

And looking at all the actuators:

test_act_all

Tomorrow I'll try running the same mission with Ign in the loop and compare the data. In the meantime, try it out and please let me know if you have any questions!

Thanks!

@chapulina
Copy link
Contributor

Thanks, @braanan ! This will be very helpful!

@chapulina chapulina transferred this issue from another repository Nov 2, 2021
@chapulina chapulina mentioned this issue Nov 24, 2021
28 tasks
@caguero caguero closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants