paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Lost in cam and motors


From: Andrius Batalauskas
Subject: Re: [Paparazzi-devel] Lost in cam and motors
Date: Wed, 5 Dec 2012 14:05:49 +0100 (CET)

Hey everybody (Felix in particular :-),

Wiki is still not quite up to date I think. I changed the aircraft section to this:

<command_laws>
    <!-- command_laws is needed for pwm_supervision -->
    <!-- but can be empty if no additional servos are used -->
    <set command="CAM_PAN" value="@YAW"/>
    <set command="CAM_TILT" value="@GAIN1"/>
    <set servo="CAM_PAN"      value="@CAM_PAN"/>
    <set servo="CAM_TILT"     value="@CAM_TILT"/>
</command_laws>

Just like in the wiki. Got the following error during make step:

Exception:
ExtXml.Error
 "Error: Attribute 'servo' expected in <<VALUE=\"@YAW\" COMMAND=\"CAM_PAN\" >>".
make[1]: *** [/home/and/papa_fresh/var/Quad_LisaM_HSB/generated/airframe.h] Error 2
make[1]: Leaving directory `/home/and/papa_fresh'
make: *** [ap.ac_h] Error 2
make: Leaving directory `/home/and/papa_fresh'

Seems the servo attribute is missing. So the next try was this:

<command_laws>
    <!-- command_laws is needed for pwm_supervision -->
    <!-- but can be empty if no additional servos are used -->
    <set command="CAM_PAN" value="@YAW" servo="CAM_PAN" />
    <set command="CAM_TILT" value="@GAIN1" servo="CAM_TILT" />
</command_laws>

It´s working better but another make error appears later:

make[1]: Entering directory `/home/and/papa_fresh/sw/airborne'
DEPEND /home/and/papa_fresh/var/Quad_LisaM_HSB/ap/.depend
modules/cam_control/cam.c:51:6: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:51:21: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:52:2: error: #error CAM_PAN_MAX has to be different from CAM_PAN_NEUTRAL
modules/cam_control/cam.c:54:6: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:54:25: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:55:2: error: #error CAM_PAN_MIN has to be different from CAM_PAN_NEUTRAL
modules/cam_control/cam.c:61:7: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:61:25: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:62:2: error: #error CAM_TILT_MAX has to be different from CAM_TILT_NEUTRAL
modules/cam_control/cam.c:64:6: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:64:26: error: floating constant in preprocessor _expression_
modules/cam_control/cam.c:65:2: error: #error CAM_TILT_MIN has to be different from CAM_TILT_NEUTRAL
modules/cam_control/point.c:208:2: error: #error RADIO_TILT or RADIO_PITCH not defined.
modules/cam_control/point.c:246:2: error: #error RADIO_PAN or RADIO_ROLL not defined.
make[1]: Leaving directory `/home/and/papa_fresh/sw/airborne'

This is odd since the section in our aircraft file looks like this:

<servos>
    <servo name="SE" no="0" min="1000" neutral="1000" max="2000"/>
    <servo name="SW" no="1" min="1000" neutral="1000" max="2000"/>
    <servo name="NE" no="2" min="1000" neutral="1000" max="2000"/>
    <servo name="NW" no="3" min="1000" neutral="1000" max="2000"/>
    <servo name="CAM_PAN"       no="5" min="2000" neutral="1550" max="1000"/>
    <servo name="CAM_TILT"      no="7" min="1000" neutral="1550" max="2000"/>
  </servos>

Therefore CAM_PAN_MAX != CAM_PAN_NEUTRAL ...
This error does not happen if the following section is commented out btw (aircraft xml):

<modules main_freq="60">
   <load name="cam_point.xml">
     <define name="POINT_CAM_PITCH_ROLL"  value="1"/>
     <define name="SHOW_CAM_COORDINATES" value="1"/>
   </load>
</modules>

So I guess that´s the cam point module that doesn´t suppose to work with our copter. Ok, I get it.

But another error appears further down (also in the "make" step):

firmwares/rotorcraft/actuators/actuators_pwm_supervision.c: In function 'actuators_set':
firmwares/rotorcraft/actuators/actuators_pwm_supervision.c:57:3: error: 'COMMAND_GAIN1' undeclared (first use in this function)
firmwares/rotorcraft/actuators/actuators_pwm_supervision.c:57:3: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [/home/and/papa_fresh/var/Quad_LisaM_HSB/ap/firmwares/rotorcraft/actuators/actuators_pwm_supervision.o] Error 1
make[1]: Leaving directory `/home/and/papa_fresh/sw/airborne'
make: *** [ap.compile] Error 2
make: Leaving directory `/home/and/papa_fresh'

Does it mean that the complete cam functionality does not work? Or do I make a mistake here?
I mean, IFAIK the cam point module is for countering the copter inclination so that the camera is focused on one point. We would like to adjust the servos manually at least -via our remote control. Is this possible?





Am 05.12.2012 00:17, schrieb Felix Ruess:
Hi Andrius,

'param' for modules does not exist anymore, use the standard 'define' instead... apparently this information on the wiki was quite old, updated that part.

However, the cam_point module is currently only usable with the fixedwing firmware.
With the state interface and the common actuators code in the development branch (master) it should by quite easy to clean that up so it can be used for all firmwares.
Anyone got some spare time?

Cheers, Felix



On Tue, Dec 4, 2012 at 9:40 PM, Andrius Batalauskas <address@hidden> wrote:
Cam also doesn´t work. I copied the code from
http://paparazzi.enac.fr/wiki/Pan_Tilt_Camera
to the places I think the belong to (no guarantee; see the file attached) but can´t compile now:

"Quad_LisaM_HSB
BUILD Quad_LisaM_HSB, TARGET ap
/home/and/papa_fresh/conf/airframes/lisa_m_hsb_cam.xml: Unexpected tag : 'PARAM'
make: *** [ap.ac_h] Error 1
make: Leaving directory `/home/and/papa_fresh'"

So I guess something is wrong with my cam module import inside my airframe. But what? I only changed servos to 5 and 7 and tried to keep the rest as documented in the wiki.

Any clues?


Am 28.11.2012 17:37, schrieb Eduardo lavratti:
you dont need <define name="AUTOPILOT_DISABLE_AHRS_KILL"/>

i think this will disable the secure feature when the motor not start if AHRS are not lock.
Are ou sure the kill swith are disabled ?

for the cam you need some config like this in your airframe:
i not remember if this config is for cam module.
<section name="PANTILT" prefix="CAM_">
    <define name="PAN_MIN" value="-45"/>
    <define name="PAN_NEUTRAL" value="0"/>
    <define name="PAN_MAX" value="45"/>
    <define name="PAN0" value="0"/>
    <define name="TILT_MIN" value="-90"/>
    <define name="TILT_NEUTRAL" value="0"/>
    <define name="TILT_MAX" value="90"/>
    <define name="TILT0" value="0"/>
    <define name="MODE0" value="1"/>
  </section>





Date: Wed, 28 Nov 2012 17:10:39 +0100
From: address@hidden
To: address@hidden
Subject: Re: [Paparazzi-devel] Lost in cam and motors

Here you go...
Thx a lot!

Am 28.11.2012 16:46, schrieb Eduardo lavratti:
send you airframe file so i can help.


From: address@hidden
To: address@hidden
Date: Wed, 28 Nov 2012 14:54:08 +0100
Subject: [Paparazzi-devel] Lost in cam and motors

Good day everybody,

let me introduce myself:
My name is Andrius Batalauskas and I am an Engineering student from Bremen (Germany).

My group is working with a quadrocopter consisting of:
- Liza/M 1.0
- XBee XBP 24
- Navilock NL-651EUSB u-blox 6
- Multiplex RX-5 (35MHz)
- JTAG
- Graupner mx-16s Remote

I have a couple of questions:

[Problem 1]

Currently we are trying to arm the copter motors in neutral position. Means: Throttle is down. And yaw pushed to MAX. Motors shall rotate at minimum speed now. But they do not.  Later the motors shall be disarmed when throttle is down again and yaw is MIN.

Motors are working fine with USE_THROTTLE_FOR_MOTOR_ARMING. It´s just the default arming behaviour that doesn´t work.

Part of airframe.xml:

<target name="ap" board="lisa_m_1.0">
      <subsystem name="radio_control" type="ppm"/>
      <define name="RADIO_KILL_SWITCH" value="RADIO_CAM"/>
      <define name="AUTOPILOT_DISABLE_AHRS_KILL"/>
      <!--define name="USE_THROTTLE_FOR_MOTOR_ARMING" value="1"/-->
      <!--define name="USE_KILL_SWITCH_FOR_MOTOR_ARMING" value="1"/-->
 </target>

Not sure if AUTOPILOT_DISABLE_AHRS_KILL is in the right place here. Doesn´t seem to change anything.

Part of airframe.xml:

<radio name="mx16sHSB" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000" pulse_type="POSITIVE">
 <channel ctl="A" function="THROTTLE" min="1120" neutral="1120" max="2000" average="0"/>
 <channel ctl="B" function="YAW"      min="2000" neutral="1498" max="1000" average="0"/>
 <channel ctl="C" function="PITCH"    min="2000" neutral="1498" max="1000" average="0"/>
 <channel ctl="D" function="ROLL"     min="2000" neutral="1498" max="1000" average="0"/>
</radio>

[Problem 2]

The copter will get a cam with a 1-axis servo which counters the copter pitch.
What is the basic procedure to make it work? We are kinda lost... There seems to be a camera module: cam.xml. So just include this one? Documentation http://paparazzi.enac.fr/wiki/Pan_Tilt_Camera says to add some xml code to our "Aircraft file to the right place". So what is the right place?

Any ideas are welcome!

Best regards,
Andrius

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


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


E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2012.0.2221 / Virendatenbank: 2629/5423 - Ausgabedatum: 27.11.2012



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


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


E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2012.0.2221 / Virendatenbank: 2629/5424 - Ausgabedatum: 28.11.2012


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




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


E-Mail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 2012.0.2221 / Virendatenbank: 2634/5436 - Ausgabedatum: 04.12.2012




reply via email to

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