ethz-asl / asctec_mav_framework

Framework for data aquisition and position control to be used with the highlevel processor of Ascending Technologies helicopters
http://www.ros.org/wiki/asctec_mav_framework
36 stars 40 forks source link

Serial communication #78

Closed DentOpt closed 5 years ago

DentOpt commented 5 years ago

Hi,

I am currently trying to use the asctec_mav_framework on a Mastermind to communicate with the autopilot board of an Asctec Firefly. Unfortunately, I do not get any serial connection. I have been upgrading the Autopilot board via the Asctec Research Upgrade Tool to the latest version 2.2b http://wiki.asctec.de/display/AR/Research+Upgrade+Download

On the Mastermind i am using Ubuntu 16.04.1 with Ros-Kinetic. The Mastermind is connected with the Autopilot board according to http://wiki.asctec.de/display/AR/AscTec+Mastermind and http://wiki.asctec.de/display/AR/Pinout+and+Connections

Mastermind: (UART_C | /dev/ttyS2) --> HL Serial 0: HLP-AutoPilot  
Mastermind: (UART_D | /dev/ttyS3) --> LL Serial 0: LLP-AutoPilot

Unfortuately, if I try to run the ros interface:

roslaunch asctec_hl_interface fcu.launch

no connection is established. I have also tried the combination with the RC remote control and all RC control modes - still no result.

Here is the output:

CLEAR PARAMETERS
 * /fcu/
PARAMETERS
 * /fcu/fcu/baudrate: 57600
 * /fcu/fcu/frame_id: fcu
 * /fcu/fcu/mav_type: firefly
 * /fcu/fcu/max_velocity_xy: 0.5
 * /fcu/fcu/max_velocity_z: 0.5
 * /fcu/fcu/packet_rate_ekf_state: 100.0
 * /fcu/fcu/packet_rate_gps: 5.0
 * /fcu/fcu/packet_rate_imu: 100.0
 * /fcu/fcu/packet_rate_rc: 20.0
 * /fcu/fcu/packet_rate_ssdk_debug: 10.0
 * /fcu/fcu/position_control: False
 * /fcu/fcu/serial_port: /dev/ttyS2
 * /fcu/fcu/state_estimation: False
 * /fcu/ssdk/omega_0_xy: 2.5
 * /fcu/ssdk/omega_0_z: 8.0
 * /fcu/ssdk/p16: 5.0
 * /fcu/ssdk/p17: 15.0
 * /fcu/ssdk/p18: 4.0
 * /fcu/ssdk/p20: 32.0
 * /fcu/ssdk/p21: 12.0
 * /fcu/ssdk/p22: 5.0
 * /fcu/ssdk/p23: 1.3
 * /fcu/ssdk/p24: 2.0
 * /fcu/ssdk/p35: 18.01
 * /fcu/ssdk/p36: 45.18
 * /fcu/ssdk/p37: 0.45
 * /fcu/ssdk/p38: 1.0
 * /fcu/ssdk/p39: 1.0
 * /fcu/ssdk/p40: 1.0
 * /fcu/ssdk/p41: 18.01
 * /fcu/ssdk/p42: 45.18
 * /fcu/ssdk/p43: 0.45
 * /fcu/ssdk/p45: 1.0
 * /fcu/ssdk/p46: 0.5
 * /fcu/ssdk/p48: 2.0
 * /fcu/ssdk/p49: 2.0
 * /fcu/ssdk/p9: 15.0
 * /fcu/ssdk/tf_ref_frame_id: world
 * /fcu/ssdk/tf_tracked_frame_id: firefly
 * /fcu/ssdk/zeta_xy: 1.0
 * /fcu/ssdk/zeta_z: 1.0
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /fcu (asctec_hl_interface/hl_node)

ROS_MASTER_URI=http://localhost:11311

process[fcu-1]: started with pid [5162]
[ INFO] [1543848456.945263203]: INFO: opened serial port /dev/ttyS2 with baudrate 57600
[ INFO] [1543848456.945511871]: configured serial port(s), checking connection ... 
waiting for acknowledged packet timed out
rx timeout
waiting for acknowledged packet timed out
waiting for acknowledged packet timed out
rx timeout
waiting for acknowledged packet timed out
waiting for acknowledged packet timed out
[ERROR] [1543848459.448660295]: failed
[ERROR] [1543848459.448761260]: unable to connect
rx timeout
rx timeout
[fcu-1] process has died [pid 5162, exit code 255, ...

Did you ever have this issue/know how to resolve this? Thanks a lot, Jan

DentOpt commented 5 years ago

Hi again,

Instead of the HL Controller update v2.2b from Asctec Research Upgrade Tool, I now also have tried to directly compile the source in asctec_mav_framework/asctec_hl_firmware/ I succeeded to make the main.hex and main.elf files, but am failing in flashing it onto the board computer. If I use

sudo openocd -f lpc2xxx_asctecusbjtag05.cfg

I get the error

Error: The specified debug interface was not found (ft2232).

In lpc2xxx_asctecusbjtag05.cfg the following is defined

interface ft2232
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0xbaf8
jtag_khz 5
telnet_port 4444
gdb_port 3333
...

Does anyone have experience how to use the ft2232 interface with openocd? Thanks in advance and best regards, Jan