[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Paparazzi-devel] Building a Code for the first time
From: |
notoriou5 |
Subject: |
[Paparazzi-devel] Building a Code for the first time |
Date: |
Sun, 20 Mar 2016 07:16:26 -0700 (MST) |
Hello,
I am pretty new to paparazzi and I am about to build my first own code. I
tried to build a code for a Y4-Copter which is supposed to get a tilting
coaxial front engine later.
The Code is mostly the basics I found on the homepage with some inspiration
from the old quadshot file. As Flight Plan, Settings, Radio and Telemetry
files I just used the dummy.xml file.
I tried to build it with the Target set as sim and as ap, but neither of
them worked. I always get the following message:
- - - - -
RUN 'make -C /home/kevin/paparazzi -f Makefile.ac AIRCRAFT=Tiltrotor
PRINT_CONFIG=1 sim.compile '
make: Entering directory `/home/kevin/paparazzi'
#######################################
# BUILD AIRCRAFT=Tiltrotor, TARGET sim
#######################################
Fatal error: exception Xml.Error(_)
make: *** [sim.ac_h] Error 2
make: Leaving directory `/home/kevin/paparazzi'
FAILED 'make -C /home/kevin/paparazzi -f Makefile.ac AIRCRAFT=Tiltrotor
PRINT_CONFIG=1 sim.compile' with code 2
- - - - -
I could not find a easy way to attach my aircraft file, so I will just post
it here:
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<airframe name="Tiltrotor">
<firmware name="rotorcraft">
<target name="nps" board="pc">
<subsystem name="fdm" type="jsbsim"/>
</target>
<target name="ap" board="lisa_mx_2.1"/>
<subsystem name="imu" type="aspirin_v2.1"/>
<subsystem name="ahrs" type="int_cmpl_euler"/>
<subsystem name="radio_control" type="ppm">
<define name="RADIO_MODE" value="RADIO_AUX1"/>
<subsystem name="telemetry" type="xbee_api"/>
<subsystem name="actuators" type="pwm">
<define name="SERVO_HZ" value="400"/>
<subsystem name="stabilization" type="int_euler"/>
<subsystem name="ins"/>
</firmware>
<servos driver="Pwm">
<servo name="FT" no="0" min="1000" neutral="1050" max="2000"/>
<servo name="FB" no="1" min="1000" neutral="1050" max="2000"/>
<servo name="BL" no="2" min="1000" neutral="1050" max="2000"/>
<servo name="BR" no="3" min="1000" neutral="1050" max="2000"/>
<servo name="ELEVON_LEFT" no="4" min="1000" neutral="1500" max="2000"/>
<servo name="ELEVON_RIGHT" no="5" min="1000" neutral="1500" max="2000"/>
<servo name="TILT" no="6" min="1000" neutral="1500" max="2000"/>
</servos>
<commands>
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" 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="FT" value="motor_mixing.commands[0]"/>
<set servo="FB" value="motor_mixing.commands[1]"/>
<set servo="BL" value="motor_mixing.commands[2]"/>
<set servo="BR" value="motor_mixing.commands[3]"/>
<let var="hover_left" value="0"/>
<let var="hover_right" value="0"/>
<let var="flight_left" value="0"/>
<let var="fight_right" value="0"/>
<set servo="ELEVON_LEFT" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_left : $flight_left" />
<set servo="ELEVON_RIGHT" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_right : $flight_right" />
</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="4"/>
<define name="SCALE" value="256"/>
<let var="hover_pitch" value="{ 256, 256, 0, 0 }"/>
<let var="hover_roll" value="{ 256, -256, -256, 256 }"/>
<let var="hover_yaw" value="{ -256, 256, 0, 0 }"/>
<let var="hover_thrust" value="{ 256, 256, 256, 256 }"/>
<let var="flight_pitch" value="{ 0, 0, 0, 0 }"/>
<let var="flight_roll" value="{ 0, 0, 0, 0 }"/>
<let var="flight_yaw" value="{ 0, 0, 0, 0 }"/>
<let var="flight_thrust" value="{ 256, 256, 0, 0 }"/>
<define name="PITCH_COEF" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_pitch : flight_pitch"/>
<define name="ROLL_COEF" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_roll : flight_roll"/>
<define name="YAW_COEF" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_yaw : flight_yaw"/>
<define name="THRUST_COEF" value="AP_MODE == AP_MODE_RC_DIRECT ?
$hover_thrust : flight_thrust"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_MANUAL" value="AP_MODE_KILL"/>
<define name="MODE_AUTO1" value="AP_MODE_RC_DIRECT"/>
<define name="MODE_AUTO2" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="USE_THROTTLE_FOR_MOTOR_ARMING" value="TRUE"/>
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="HOVER_KP" value="150"/>
<define name="HOVER_KD" value="80"/>
<define name="HOVER_KI" value="20"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<define name="PGAIN" value="50"/>
<define name="DGAIN" value="100"/>
<define name="IGAIN" value="20"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<define name="SP_MAX_PHI" value="45." unit="deg"/>
<define name="SP_MAX_THETA" value="45." unit="deg"/>
<define name="SP_MAX_R" value="90." unit="deg/s"/>
<define name="DEADBAND_A" value="0"/>
<define name="DEADBAND_E" value="0"/>
<define name="DEADBAND_R" value="250"/>
<define name="REF_OMEGA_P" value="800" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.85"/>
<define name="REF_MAX_P" value="400." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_Q" value="800" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.85"/>
<define name="REF_MAX_Q" value="400." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_R" value="500" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.85"/>
<define name="REF_MAX_R" value="180." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/>
<define name="PHI_PGAIN" value="1000"/>
<define name="PHI_DGAIN" value="400"/>
<define name="PHI_IGAIN" value="200"/>
<define name="THETA_PGAIN" value="1000"/>
<define name="THETA_DGAIN" value="400"/>
<define name="THETA_IGAIN" value="200"/>
<define name="PSI_PGAIN" value="500"/>
<define name="PSI_DGAIN" value="300"/>
<define name="PSI_IGAIN" value="10"/>
<define name="PHI_DDGAIN" value="300"/>
<define name="THETA_DDGAIN" value="300"/>
<define name="PSI_DDGAIN" value="300"/>
</section>
</airframe>
- - - - - -
I really hope to get some ideas on how to solve this problem.
Thanks to everyone taking out so much time of his to help me,
Kevin
--
View this message in context:
http://lists.paparazziuav.org/Building-a-Code-for-the-first-time-tp17812.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.
- [Paparazzi-devel] Building a Code for the first time,
notoriou5 <=
- Re: [Paparazzi-devel] Building a Code for the first time, Felix Ruess, 2016/03/20
- Re: [Paparazzi-devel] Building a Code for the first time, notoriou5, 2016/03/24
- Re: [Paparazzi-devel] Building a Code for the first time, Felix Ruess, 2016/03/24
- Re: [Paparazzi-devel] Building a Code for the first time, notoriou5, 2016/03/24
- Re: [Paparazzi-devel] Building a Code for the first time, Felix Ruess, 2016/03/24
- Re: [Paparazzi-devel] Building a Code for the first time, notoriou5, 2016/03/24
- Re: [Paparazzi-devel] Building a Code for the first time, notoriou5, 2016/03/27
- Re: [Paparazzi-devel] Building a Code for the first time, Felix Ruess, 2016/03/30