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
_______________________________________________
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