Communication between Rasberry Pi 3 and Pixhawk

Dear,

Recently, I am doing my thesis project relate to computer vision on Drone

I choose to use Raspberry pi 3 to do image processing and communicate with Pixhawk via Dronekit api

I am following this instruction to make a connection of 2 boards: http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

But i face a problem when I try to send command from Rpi to Pixhawk as the picture below

3691318511?profile=original

There are some problems that I can not answer:

1. In the tutorial, there are 3 files should be sent from pixhawk to Rpi : mav.parm, flight.tlog, flight.tlog.raw but I can not find mav.param? How to get it?
2. I do not know the text "No module named adsb". Use 'set moddebug 3' in the MavProxy.... What I should do?
3. After I enter "param show ARMING_CHECK", it does not display the ARM_CHECK value like the instruction, and I can not command anything?


Please support me to solve these problems. Thank you very much for the time

Regards

ANH

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hey Anh,

    Since this is a closely coupled configuration you might want to consider using the SPI interface for the low level connection.  The USART will limit data throughput to about 10kbyte/sec max. With SPI, it should be possible to run at an order of magnitude faster or more (possibly up to 10megabaud) and in addition, use DMA.

    I am looking into doing just such a connection for coupling compute modules to flight controllers and routing through Mavlink; Pi, Intel Edison, etc..

    Take a look at MAVROS.

    Good luck!

  • Hi Anh, I'm doing a very similar project and was wondering if it would be possible to discuss a few things with you?

    Best Regards

    Josh

  • Hi, man
    Finally I solve my problem with support from an expert in drone-kit forum
    I used 2 stable version of ArduCopter (3.2.1 and 3.3), they may ignore the communication between my Rpi and Pixhawk
    So now, I flash my pixhawk with the latest version (copter 3.4-dev) and change some parameters by Mission planner:

    SERIAL2_PROTOCOL '1'
    SERIAL2_BAUD '57'
    BRD_SER2_RTSCTS '0'

    For Rpi3, add 2 lines at the end of /boot/config.txt (it will disable bluetooth and you can use /dev/ttyAMA0):
    enable_uart=1

    dtoverlay=pi3-disable-bt

    3702304794?profile=original

    Best regards,
    Anh


  • Hello Hugues,

    I tried your solution but my problem still happens, you can see in the picture below
    3702304367?profile=original

    Actually, when I tried in my ubuntu, it worked very well

    https://storage.ning.com/topology/rest/1.0/file/get/3702304367?profile=original
  • MR60

    hi,

    in your mavproxy.py command line arguments , you are using --baudrate and --aircraft Mycopter. Try without these arguments.

    The adsb thing relates to a module used for detection of other aircrafts in the vicinity. You can ignore it or disable the loading of that module (for that you need to edit the file listing the modules to load at launch of mavproxy)

    I do not know the answr to your files question. It should not matter to make mavproxy work.

This reply was deleted.

Activity