paparazzi-devel
[Top][All Lists]
Advanced

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

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


From: Chris
Subject: [Paparazzi-devel] nps simulator GCS shows 0 for battery voltage
Date: Sat, 19 Oct 2013 14:38:08 +0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0

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






reply via email to

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