paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Problem with FTDI ground station


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Problem with FTDI ground station
Date: Tue, 19 Aug 2014 18:16:38 +0200

Hi,

if you don't configure the baud rate in the airframe file it defaults to 57600 baud, so that is fine.
Did you check if your serial connection via this FTDI utility board is really the device under /dev/ttyUSB0?

Cheers, Felix



On Tue, Aug 19, 2014 at 5:06 PM, alonso acuña <address@hidden> wrote:
Hi. You seem tobe missing the baud rate in the airframe file. This is the speed at which the Lisa/M communicates with the device that is connected directly to it (airborne xbee or FTDI)


    <subsystem name="telemetry" type="transparent"> 
      <configure name="MODEM_BAUD" value="B19200"/>
    </subsystem>

Also make sure to set the destination address on the airborne xbee to the address of the ground xbee  


On Mon, Aug 18, 2014 at 1:26 PM, Nicolas Quendez <address@hidden> wrote:

My airframe file seems to be in transparent mode (see the whole file at the bottom). 

For the pinout on FTDI board, yes, green Rx, and Brown Tx (and then black - ). On LisaM, green is going to Tx and Brown to Rx, so (brown, green, empty, black), following the drawing :









<!DOCTYPE airframe SYSTEM "../airframe.dtd">

<!-- this is a HobbyKing Bixler equiped with
  * Autopilot:   Lisa/M 2.0         http://paparazzi.enac.fr/wiki/Lisa/M_v20
  * IMU:         Aspirin 2.1        http://paparazzi.enac.fr/wiki/AspirinIMU
  * GPS:         Ublox              http://paparazzi.enac.fr/wiki/Subsystem/gps
  * RC:          any PPM system     http://paparazzi.enac.fr/wiki/Subsystem/radio_control#PPM
  * Modem        XBee in transparent mode at 57600 baud
-->

<airframe name="Bixler LisaM 2.0">

  <firmware name="fixedwing">
    <target name="ap" board="lisa_m_2.0">
      <!-- higher frequency for aspirin imu, ouputs data at 100Hz -->
      <configure name="PERIODIC_FREQUENCY" value="120"/>
      <configure name="AHRS_PROPAGATE_FREQUENCY" value="100"/>
      <configure name="AHRS_CORRECT_FREQUENCY" value="100"/>
      <define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/>
    </target>

   <!-- <target name="sim" board="pc"/> -->

    <define name="USE_MAGNETOMETER" value="FALSE"/>

    <subsystem name="radio_control" type="ppm"/>
    <subsystem name="telemetry" type="transparent"/>
    <subsystem name="control"/>
    <subsystem name="imu" type="aspirin_v2.1"/>
    <subsystem name="ahrs" type="float_dcm"/>
    <subsystem name="gps" type="ublox"/>
    <subsystem name="navigation"/>
    <subsystem name="ins" type="alt_float"/>
  </firmware>

  <!-- commands section -->
  <servos>
    <servo name="THROTTLE"      no="1" min="1120" neutral="1120" max="1920"/>
    <servo name="ELEVATOR"      no="2" min="1100" neutral="1515" max="1900"/>
    <servo name="RUDDER"        no="3" min="950"  neutral="1440" max="2050"/>
    <servo name="AILERON_RIGHT" no="4" min="1000" neutral="1500" max="2000"/>
    <servo name="AILERON_LEFT"  no="5" min="1000" neutral="1500" max="2000"/>
  </servos>

  <commands>
    <axis name="THROTTLE" failsafe_value="0"/>
    <axis name="ROLL"     failsafe_value="0"/>
    <axis name="PITCH"    failsafe_value="0"/>
    <axis name="YAW"      failsafe_value="2000"/>
  </commands>

  <rc_commands>
    <set command="ROLL"      value="@ROLL"/>
    <set command="PITCH"     value="@PITCH"/>
    <set command="THROTTLE"  value="@THROTTLE"/>
    <set command="YAW"       value="@YAW"/>
  </rc_commands>

  <section name="MIXER">
    <define name="COMBI_SWITCH" value="0.3"/>
  </section>

  <command_laws>
    <set servo="THROTTLE"    value="@THROTTLE"/>
    <set servo="ELEVATOR"    value="@PITCH"/>
    <set servo="RUDDER"      value="@YAW + @ROLL*COMBI_SWITCH"/>
    <set servo="AILERON_LEFT" value="@ROLL"/>
    <set servo="AILERON_RIGHT" value="@ROLL"/>
  </command_laws>

  <section name="AUTO1" prefix="AUTO1_">
    <define name="MAX_ROLL" value="50" unit="deg"/>
    <define name="MAX_PITCH" value="40" unit="deg"/>
  </section>

  <section name="IMU" prefix="IMU_">
    <define name="BODY_TO_IMU_PHI"   value="0." unit="deg"/>
    <define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
    <define name="BODY_TO_IMU_PSI"   value="0." unit="deg"/>
  </section>

  <section name="INS" prefix="INS_">
    <define name="ROLL_NEUTRAL_DEFAULT"  value="0" unit="deg"/>
    <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
  </section>

  <section name="BAT">
    <define name="MILLIAMP_AT_FULL_THROTTLE" value="20000" unit="mA"/>
    <define name="CATASTROPHIC_BAT_LEVEL" value="9.0" unit="V"/>
    <define name="CRITIC_BAT_LEVEL" value="9.5" unit="V"/>
    <define name="LOW_BAT_LEVEL" value="10.0" unit="V"/>
    <define name="MAX_BAT_LEVEL" value="12.5" unit="V"/>
  </section>

  <section name="MISC">
    <define name="NOMINAL_AIRSPEED" value="15." unit="m/s"/>
    <define name="CARROT" value="4." unit="s"/>
    <define name="KILL_MODE_DISTANCE" value="(2.0*MAX_DIST_FROM_HOME)"/>
    <define name="ALT_KALMAN_ENABLED" value="TRUE"/>
    <define name="DEFAULT_CIRCLE_RADIUS" value="100."/>
  </section>

  <section name="VERTICAL CONTROL" prefix="V_CTL_">
    <define name="POWER_CTL_BAT_NOMINAL" value="11.0" unit="volt"/>
    <!-- outer loop -->
    <define name="ALTITUDE_PGAIN" value="0.075" unit="(m/s)/m"/>
    <define name="ALTITUDE_MAX_CLIMB" value="4." unit="m/s"/>
    <!-- auto throttle inner loop -->
    <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.5" unit="%"/>
    <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.2" unit="%"/>
    <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="1.0" unit="%"/>
    <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500" unit="pprz_t"/>
    <define name="AUTO_THROTTLE_DASH_TRIM" value="-1000" unit="pprz_t"/>
    <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
    <define name="AUTO_THROTTLE_PGAIN" value="0.02" unit="%/(m/s)"/>
    <define name="AUTO_THROTTLE_IGAIN" value="0.03"/>
    <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.05" unit="rad/(m/s)"/>
    <define name="AUTO_PITCH_PGAIN" value="0.125"/>
    <define name="AUTO_PITCH_IGAIN" value="0.025"/>
    <define name="AUTO_PITCH_MAX_PITCH" value="25" unit="deg"/>
    <define name="AUTO_PITCH_MIN_PITCH" value="-25" unit="deg"/>
    <define name="THROTTLE_SLEW" value="1.0"/>
  </section>

  <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
    <define name="COURSE_PGAIN" value="1.0"/>
    <define name="COURSE_DGAIN" value="0.4"/>
    <define name="ROLL_MAX_SETPOINT" value="35" unit="deg"/>
    <define name="PITCH_MAX_SETPOINT" value="25" unit="deg"/>
    <define name="PITCH_MIN_SETPOINT" value="-25" unit="deg"/>
    <define name="PITCH_PGAIN" value="20000."/>
    <define name="PITCH_DGAIN" value="1.5"/>
    <define name="ELEVATOR_OF_ROLL" value="2500"/>
    <define name="ROLL_ATTITUDE_GAIN" value="7400"/>
    <define name="ROLL_RATE_GAIN" value="200"/>
  </section>

  <section name="FAILSAFE" prefix="FAILSAFE_">
    <define name="DELAY_WITHOUT_GPS" value="3" unit="s"/>
    <define name="DEFAULT_THROTTLE" value="0.4" unit="%"/>
    <define name="DEFAULT_ROLL" value="15" unit="deg"/>
    <define name="DEFAULT_PITCH" value="0" unit="deg"/>
    <define name="HOME_RADIUS" value="90" unit="m"/>
  </section>

</airframe>






Le 18 août 2014 à 15:54, David Conger <address@hidden> a écrit :

What is your airframe file like? Is the telemetry "xbee_api" or "transparent"?

FWIW: the wire from FTDIUtil I made. The pinout is: 
Black = (-)
Green = Rx
Brown = Tx

Unsure about pinout for that Lisa/M.

-David


On Mon, Aug 18, 2014 at 11:44 AM, Nicolas Quendez <address@hidden> wrote:

Hi,

After few weeks of different trials, I do not succeed in making the serial link works. In CGS, the screen is always writing « waiting for telemetry ».
Neither with the Xbee modems nor with direct link between the AP and the FTDI board. 

If someone could make me understand what I did wrong, thanks in advance...

In direct link between AP (Lisa M 2.0) and FTDI board (PPZUAV)
- The connections (Rx to Tx, Tx to Rx, ground to ground ; AP powered with 5V ; FTDI board connected by USB to the computer), it seems to me connections are OK according to wiki and FTDI board schematic :

<FTDI_LisaM.jpg>


- I do not know if there must be specific files to load ?
For now, I use Bixler_lisa_m_2.xml ;  basic.xml for navigation ;  fixed wing_basic.xml ; ctl_basic.xml ; ins_neutral.xml ; cockpitMM.xml ; and I have tried different xml files for the telemetry (default_fixedwing_imu.xml , xbee868.xml ). 
For the session, I use address@hidden (and tried other rates). 

- In the console, it runs the following without error :  
RUN '/home/nicolas/paparazzi/sw/ground_segment/tmtc/link  -d /dev/ttyUSB0 -transport xbee -s 57600'
RUN '/home/nicolas/paparazzi/sw/ground_segment/tmtc/server '
RUN '/home/nicolas/paparazzi/sw/ground_segment/cockpit/gcs '

and GCS is opening, but everything blank, with « waiting for telemetry ».


My GPS is connected, but indoor so probably no signal, but I imagine that all the IMU signals should be transmitted, no ?

Thanks in advance 
Best regards
Nicolas








Le 27 juil. 2014 à 17:37, Nicolas Quendez <address@hidden> a écrit :


Thanks Gautier,

Indeed, I missed the Udev rules copy to the good place, I will be more attentive next time ! 
So, for now, no more « failure » when I launch GCS. But still the black screen with « waiting for telemetry ». 

In XCTU (windows), from ground station modem, it detects the remote autopilot modem (when Lisa M powered), and I can see that the autopilot sends continuously some packets to the ground station modem. So informations probably go from the AP to the ground station modem well. But I suspect my Paparazzi configuration still not good because it seems it cannot read the informations and show them in GCS… 

I continue my exploration, any advices welcome !
Thanks for the support
Best regards
Nicolas




Le 25 juil. 2014 à 18:14, Gautier Hattenberger <address@hidden> a écrit :

Hi,

Did you check this pages ? :
http://wiki.paparazziuav.org/wiki/Installation/Linux#Udev_rules
http://wiki.paparazziuav.org/wiki/Installation/Linux#No_access_rights_for_USB_devices

Gautier

Le 24/07/2014 14:52, Nicolas Quendez a écrit :

Hi everybody,

I just begin to manipulate Paparazzi hardware and software. 

For now : 
- I succeed in working with flight plan simulation
- I succeed in uploading software into my Lisa M AP 
- I succeed into programming my Xbee modules with XCTU (windows) with the PPZUAV FDTI utility board. 

BUT : 
when I plug the FTDI board with xbee module (coordinator) by USB on my ubuntu computer, I have the following error when starting a session : 
Failure("Error opening modem serial device : fd < 0 (/dev/ttyUSB0) ») : 

RUN '/home/nicolas/paparazzi/sw/ground_segment/tmtc/link -d /dev/ttyUSB0 -transport xbee -s 57600'
Failure("Error opening modem serial device : fd < 0 (/dev/ttyUSB0)")
Broadcasting on network 127.255.255.255, port 2010
 Read Socket : Connection reset by peer
FAILED '/home/nicolas/paparazzi/sw/ground_segment/tmtc/link' with code 1


I have checked with dmesg that /dev/ttyUSB0 seems to be the good place for the board.
I have added the current user  to the modems group as explained in the FAQ (http://wiki.paparazziuav.org/wiki/FAQ). 
I made the xbee module set as coordinator, with baud rate set to 57000 
My Xbee is a 868 LP 80 K modem. 

On the PPZUAV FTDI board the red led is ON. 
The green led is ON (but not flashing).

Have you any idea of my mistake, or configuration that I did not do ? Are there some drivers to install for the FTDI board, or a configuration to put into the xml files ? 

Thanks in advance
Best regards
Nicolas


Hardware : 
<Pièce jointe.jpeg>

XCTU configuration : 

<Pièce jointe.gif>




_______________________________________________
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

_______________________________________________
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




--
address@hidden
_______________________________________________
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



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



reply via email to

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