paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] nps simulator GCS shows 0 for battery voltage


From: Felix Ruess
Subject: Re: [Paparazzi-devel] nps simulator GCS shows 0 for battery voltage
Date: Mon, 21 Oct 2013 15:59:08 +0200

Hi Chris,

until now NPS only supported quadrotors... this is fixed with commit 74cee62.
While the issue with the number of actuators/commands is fixed with that, you still need to create a new JSBSim model for a hexacopter if you want to use it with NPS.
Obviously you can't use a quadrotor model to simulate a hexa...

Cheers, Felix


On Sat, Oct 19, 2013 at 1:38 PM, Chris <address@hidden> wrote:
Hi.
I am trying to simulate my hexacopter before flying it and although the nps simulator shows the correct battery voltage (defined in the airframe file) when 4 motors are defined, as soon as i declare all 6 motors the simulator (GCS) indicated voltage goes to a super steady 0.
Any help welcomed because i couldn't locate something in the wiki about this.

Except for the motor definitions all other things are the same as in the
"quadrotor_lisa_m_2_pwm_spektrum.xml" airfrmae file found in the "examples" directory.

This is the airframe file for 4 motors:

  <servos driver="Pwm">
    <servo name="FRONT"   no="0" min="1000" neutral="1100" max="1900"/>
    <servo name="BACK"    no="1" min="1000" neutral="1100" max="1900"/>
    <servo name="RIGHT"   no="2" min="1000" neutral="1100" max="1900"/>
    <servo name="LEFT"    no="3" min="1000" neutral="1100" max="1900"/>
  </servos>

  <commands>
    <axis name="ROLL"   failsafe_value="0"/>
    <axis name="PITCH"  failsafe_value="0"/>
    <axis name="YAW"    failsafe_value="0"/>
    <axis name="THRUST" failsafe_value="0"/>
  </commands>

  <section name="MIXING" prefix="MOTOR_MIXING_">
    <define name="TRIM_ROLL" value="0"/>
    <define name="TRIM_PITCH" value="0"/>
    <define name="TRIM_YAW" value="0"/>
    <define name="NB_MOTOR" value="4"/>
    <define name="SCALE" value="512"/>
    <define name="ROLL_COEF"   value="{    0,    0, -512,  512 }"/>
    <define name="PITCH_COEF"  value="{  512, -512,    0,    0 }"/>
    <define name="YAW_COEF"    value="{ -512, -512,  512,  512 }"/>
    <define name="THRUST_COEF" value="{  512,  512,  512,  512 }"/>
  </section>

  <command_laws>
    <call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/>
    <set servo="FRONT" value="motor_mixing.commands[SERVO_FRONT]"/>
    <set servo="BACK" value="motor_mixing.commands[SERVO_BACK]"/>
    <set servo="RIGHT" value="motor_mixing.commands[SERVO_RIGHT]"/>
    <set servo="LEFT" value="motor_mixing.commands[SERVO_LEFT]"/>
  </command_laws>

AND here is the relevant part with all 6 motors:

<servos driver="Pwm">
    <servo name="FRONT_LEFT"   no="0" min="1000" neutral="1040" max="1880"/>
    <servo name="FRONT_RIGHT"  no="1" min="1000" neutral="1040" max="1880"/>
    <servo name="RIGHT"        no="2" min="1000" neutral="1040" max="1880"/>
    <servo name="BACK_RIGHT"   no="3" min="1000" neutral="1040" max="1880"/>
    <servo name="BACK_LEFT"    no="4" min="1000" neutral="1040" max="1880"/>
    <servo name="LEFT"         no="5" min="1000" neutral="1040" max="1880"/>
</servos>

  <commands>
    <axis name="ROLL"   failsafe_value="0"/>
    <axis name="PITCH"  failsafe_value="0"/>
    <axis name="YAW"    failsafe_value="0"/>
    <axis name="THRUST" failsafe_value="0"/>
  </commands>

<command_laws>
    <call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/>
    <set servo="FRONT_LEFT" value="motor_mixing.commands[SERVO_FRONT_LEFT]"/>
    <set servo="FRONT_RIGHT" value="motor_mixing.commands[SERVO_FRONT_RIGHT]"/>
    <set servo="RIGHT" value="motor_mixing.commands[SERVO_RIGHT]"/>
    <set servo="BACK_RIGHT" value="motor_mixing.commands[SERVO_BACK_RIGHT]"/>
    <set servo="BACK_LEFT" value="motor_mixing.commands[SERVO_BACK_LEFT]"/>
    <set servo="LEFT" value="motor_mixing.commands[SERVO_LEFT]"/>
</command_laws>

 <section name="MIXING" prefix="MOTOR_MIXING_">
    <define name="TRIM_ROLL" value="0"/>
    <define name="TRIM_PITCH" value="0"/>
    <define name="TRIM_YAW" value="0"/>
    <define name="NB_MOTOR" value="6"/>
    <define name="SCALE" value="512"/>
    <define name="ROLL_COEF"   value="{  512, -512, -512, -512, 512,  512 }"/>
    <define name="PITCH_COEF"  value="{  512,  512,    0, -512, -512,    0 }"/>
    <define name="YAW_COEF"    value="{  512, -512,  512, -512, 512, -512 }"/>
    <define name="THRUST_COEF" value="{  512,  512,  512,  512, 512,  512 }"/>

Chris




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]