Companion computer thru USB on Orange Cube

Hi,

I have connected a raspberry PI on Orange cube via a usb connection on carrier board.
When I launch sample from DroneKit I have partial information but many exceptions as displayed below.

Have you experienced the same issue ? I have looked at similar issues on the forum but none seems to have a valid solution

~/git/dronekit-python/examples/vehicle_state $ python3 vehicle_state.py  --connect /dev/ttyACM0

Connecting to vehicle on: /dev/ttyACM0
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554844, 0) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 4) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554844, 0) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 4) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554844, 0) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 4) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554844, 0) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 4) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554844, 0) not available on mavlink definition

Get all vehicle attribute values:
 Autopilot Firmware version: UnknownAutoPilotUnknownVehicleType0-4.2.3
   Major version number: 4
   Minor version number: 2
   Patch version number: 3
   Release type: rc
   Release version: 0
   Stable release?: True
 Autopilot capabilities
   Supports MISSION_FLOAT message type: True
   Supports PARAM_FLOAT message type: True
   Supports MISSION_INT message type: True
   Supports COMMAND_INT message type: True
   Supports PARAM_UNION message type: False
   Supports ftp for file transfers: True
   Supports commanding attitude offboard: True
   Supports commanding position and velocity targets in local NED frame: True
   Supports set position + velocity targets in global scaled integers: True
   Supports terrain protocol / data handling: True
   Supports direct actuator control: False
   Supports the flight termination command: True
   Supports mission_float message type: True
   Supports onboard compass calibration: True
 Global Location: LocationGlobal:lat=0.0,lon=0.0,alt=None
 Global Location (relative altitude): LocationGlobalRelative:lat=0.0,lon=0.0,alt=0.299
 Local Location: LocationLocal:north=None,east=None,down=None
 Attitude: Attitude:pitch=0.00031487480737268925,yaw=-0.4115520119667053,roll=0.008445391431450844
 Velocity: [0.0, 0.0, 0.0]
 GPS: GPSInfo:fix=0,num_sat=0
 Gimbal status: Gimbal: pitch=None, roll=None, yaw=None
 Battery: Battery:voltage=0.0,current=None,level=None
 EKF OK?: False
 Last Heartbeat: 0.20486640600000072
 Rangefinder: Rangefinder: distance=None, voltage=None
 Rangefinder distance: None
 Rangefinder voltage: None
 Heading: 336
 Is Armable?: False
 System status: STANDBY
 Groundspeed: 0.00217433855868876
 Airspeed: 0.0
 Mode: STABILIZE
 Armed: False
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1567, in notify_message_listeners
    fn(self, name, msg)
  File "/usr/local/lib/python3.9/site-packages/dronekit-2.9.2-py3.9.egg/dronekit/__init__.py", line 1259, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 4) not available on mavlink definition
 Waiting for home location ...
 Waiting for home location ...
 Waiting for home location ...
 Waiting for home location ...
 Waiting for home location ...
 Waiting for home location ...
 Waiting for home location ...

For info it connects well with mavproxy.py
‘’’
$ mavproxy.py --master=/dev/ttyACM0
Connect /dev/ttyACM0 source_system=255
Failed to load module: No module named ‘cmdlong’. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
Failed to load module: No module named ‘terrain’. Use ‘set moddebug 3’ in the MAVProxy console to enable traceback
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyACM0
MAV> Detected vehicle 1:0 on link 0
online system 1
UNKNOWN> Mode UNKNOWN
fence present
Detected vehicle 1:1 on link 0
STABILIZE> Detected vehicle 42:100 on link 0
AP: ArduCopter V4.2.3 (a480c0a7)
AP: ChibiOS: 38022f4f
AP: CubeOrange 00250033 31315113 37323839
AP: RCOut: PWM:1-14
AP: IMU0: fast sampling enabled 8.0kHz/2.0kHz
AP: IMU1: fast sampling enabled 9.0kHz/2.3kHz
AP: IMU2: fast sampling enabled 9.0kHz/2.3kHz
AP: Frame: OCTAQUAD/X
Received 963 parameters (ftp)
Saved 963 parameters to mav.parm
Mode STABILIZE
‘’’

Hi
Have you used a micro USB cable having both end with micro USB type connectors to connect between RaspI and Orange CUBE !!

Hi SJ, no I am using a Standard USB cable (Micro on Oneside and USB Std on the other).

1 Like

I don’t remember seeing a USB std connector for the CUBE :)) may be I am getting Old. …From what i understand Raspi can be connected using UART PINS to UART port of the CUBE

the USB A port is on the Raspberry Pi and Micro on the cube

1 Like