Wow, thanks a lot! I´ll try it as soon
as I have access to the copter again and will provide some
feedback then.
Find the airframe and radio file attached if you are interested.
Everything else are default files (see pic). We got the copter
from another student group and are not sure if it´s configured
properly. The other group didn´t have a clue either.
Newest Paparazzi version was loaded 2 weeks ago. So that should be
up to date. For starters we would like to implement the cam somehow
not necessarily good. But if it´s not possible for a beginner
to do, we´ll have to live with it.
Cheers!
Am 05.12.2012 15:02, schrieb Gautier Hattenberger:
Hello,
Le 05/12/2012 14:05, Andrius Batalauskas a écrit :
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>
There is no <set command value/>, only <set servo
value/> in this section.
The two "set command" should be in rc_commans section, assuming
you want to control the camera in manual using the YAW and GAIN1
channel of your RC. If you don't care about manual control, remove
the two lines.
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.
Do you have a section like this in your airframe ? :
<section name="CAM" prefix="CAM_">
<define name="TILT_MAX" value="30" unit="deg"/>
<define name="TILT_NEUTRAL" value="0" unit="deg"/>
<define name="TILT_MIN" value="-30" unit="deg"/>
<define name="TILT0" value="0" unit="deg"/>
<define name="PAN_MAX" value="45" unit="deg"/>
<define name="PAN_NEUTRAL" value="0" unit="deg"/>
<define name="PAN_MIN" value="-45" unit="deg"/>
<define name="PAN0" value="0" unit="deg"/>
</section>
The min and max in the servo sections are the bound values of the
actual servo in ms for the pwm output signal.
CAM_XXX_MIN/MAX/NEUTRAL are the maximum positions of the camera in
degrees.
I'm not completely sure if the cam module is using correctly
radians/degrees. So it might be necessary to add code_unit="deg"
after unit="deg", otherwise you may have issue with automatic
conversion.
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?
Without your actual airframe and RC files (and paparazzi version)
it is a bit hard to tell. Controlling in manual is possible, but
the cam module was made for fixedwing firmware long ago and it may
not work correctly with rotorcraft (yet).
Gautier
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
_______________________________________________
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/5438 - Ausgabedatum:
05.12.2012
|