Getting Started with DJI M210 - Able to connect but can't control thru FlytPilot

#9

That’s interesting. Do you mean the M210 gives different kind of data in simulation compared to actual? I will give this another try sometime later. But from my previous trials, I managed to manually arm the M210 using RC in simulation, however taking control using the FlytPilot gave GPS Lock error in the run logs. That’s why I decided to test this outdoor where the GPS is abundance. Am I missing some silly steps here? Like pressing a button/change rc mode etc.? I don’t know. Lol.

My M210 setup for simulation:

  1. M210 connected to a Laptop running DJI Assistant 2 using USB-USB cable. M210 mode switch to the most left (Laptop).
  2. TX2 with FlytOS is connected to an office wifi router and to the M210 using USB-TTL cable.
  3. Laptop connected to same office wifi router.
  4. FlytConsole shows valid connection (green “Connected”, voltage, HUD, etc).

Upon simulation and manually armed using RC, the HUD/compass give response. However, like I said before, controlling the M210 in simulation using FlytPilot (I entered the TX2 IP address and get valid connection) gave me the GPS Lock error as per run logs attached above. Anything wrong with my setup?

#10

All the steps seems OK.
Thank you for mentioning the steps.
Let me get back to you on this by the end of day.

Let’s focus on first getting the it up and running with the DJI simulator.

#11

Hi @srv-admin,

It has been a while. Do you have any update on this?

#12

Hi @hann

Did you try following my above steps? Is it still not working in simulator?
We are in constant touch with DJI SDK team, they are trying to replicate and fix it on their end.

#13

Hi @srv-admin,

Currently, the M210 is occupied by someone else. So, I am not be able to retry. But I will as soon as I possibly can.

From my previous test, I did manually arm using RC in the Simulation, but I didn’t get GPS Lock (However, HUD and compass are showing the right thing). So any command I gave will show No GPS Lock error in the run logs.

When you say,

does that mean using FlytPilot as well?

Thanks
Hanif

#14

Yes.

DJI Support team has not been of much help to us. I will keep probing them.

#15

Hi @srv-admin,

Since you have mentioned this earlier, is it still possible to bypass the GPS Lock? What are the consequences?

Update: I managed to retest this on the DJI Simulation, the drone can be armed MANUALLY using RC, but controlling using FlytPilot/web-based Joystick isn’t possible (No GPS Lock, Satellite shows only 5 unit, RC shows 15).

Thanks
Hanif

#16

Sorry for the delayed response. Please allow me to get back to you on this in a day or two.

#17

Hi @srv-admin,

Just another update: https://i.imgur.com/DdfKWuw.mp4

As you can see, I can manually arm and control the aircraft using RC, but unfortunately controlling using FlytPilot seems impossible. Note the red “No GPS Lock” in the FlytConsole. This can also be seen in the run logs where the FlytOS can’t take command since there is no GPS Lock.

#18

Hey sorry for the delays from our end. We couldn’t get further into this since last few days. Please allow us some more time to get this fixed.

Thanks for your patience.

#19

Hi @srv-admin,

Have you got the chance to look into this?

Thanks.

#20

Seems like it got fixed in the latest version of DJI M210 Firmware. We are not being able to replicate this at our end (with the latest firmware). Can you please try again.

#21

Hi @srv-admin,

When you say firmware, does it mean the aircraft firmware? or the new OSDK 3.8?

Thanks.

#22

M210 aircraft firmware.

#23

Hi @srv-admin,

I have just got the chance to look into this yesterday. And I discovered there is no new firmware released for the M210 like you mentioned earlier. But I still give it a try anyway. Unfortunately, still no luck. I am getting false Satellite Signal (only 5) and no GPS Lock in DJI Assistant 2 Simulation.

Is there any way that I can override the GPS Lock in FlytOS?

Thanks,
Hanif

#24

Hi @hann,

We have created a detailed setup document for you.

Please follow the guide and update this thread if you still face this issue.

#25

Hi @srv-admin,

I am having similar symptoms with the M210 RTK. I have followed the directions that you posted and the aircraft connects to flytconsole. I am reading 0 satellites on the flytconsole GCS but 15+ on the DJI controller.

We are ultimately attempting to connect the M210 and M600 to a GCS over cellular.

Any help would be great!

Wes-

#26

Here are my run logs:

User launch file not found

… logging to /home/nvidia/.ros/log/e94cc29e-71e3-11e9-ba4f-00044b8d3fff/roslaunch-tegra2-iarc-28543.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
e]2;/flyt/flytos/flytcore/share/core_api/launch/core_api_autopilot.launcha
e[1mstarted roslaunch server http://tegra2-iarc:40198/e[0m

SUMMARY

PARAMETERS

  • /flytos/core_api_navigation/is_dji: True
  • /flytos/core_api_param/is_dji: True
  • /flytos/core_api_payload/is_dji: True
  • /flytos/core_api_setup/is_dji: True
  • /flytos/dji_sdk/align_time: False
  • /flytos/dji_sdk/app_id: 1072820
  • /flytos/dji_sdk/app_version: 1
  • /flytos/dji_sdk/baud_rate: 921600
  • /flytos/dji_sdk/enc_key: a5cb62cd8e7ee9a33…
  • /flytos/dji_sdk/serial_name: /dev/ttyUSB0
  • /flytos/dji_sdk/use_broadcast: True
  • /flytos/rostful/enable_cache: False
  • /flytos/rostful/params: []
  • /flytos/rostful/services: [’/get_global_nam…
  • /flytos/rostful/topics: [’/./mavros/.’,…
  • /global_namespace: flytos
  • /rosdistro: kinetic
  • /rosversion: 1.12.14

NODES
/flytos/
core_api_navigation (core_api_nodes/navigation_api)
core_api_param (core_api_nodes/param_api)
core_api_payload (core_api_nodes/payload_api)
core_api_setup (core_api_nodes/setup_api)
dji_sdk (dji_sdk/dji_sdk_node)
dji_sdk_remap (dji_sdk/dji_sdk_remap)
flyt_cl (flyt_remote_link/flyt_remote_client)
flyt_ms_node (flyt_ms/flyt_ms_node)
navigation_server (navigation_util/navigation_server)
rosapi (rosapi/rosapi_node)
rostful (rostful/devserver)

auto-starting new master
e[1mprocess[master]: started with pid [28661]e[0m
e[1mROS_MASTER_URI=http://localhost:11311e[0m
e]2;/flyt/flytos/flytcore/share/core_api/launch/core_api_autopilot.launch http://localhost:11311a
e[1msetting /run_id to e94cc29e-71e3-11e9-ba4f-00044b8d3fffe[0m
e[1mprocess[rosout-1]: started with pid [28674]e[0m
started core service [/rosout]
e[1mprocess[flytos/dji_sdk-2]: started with pid [28691]e[0m
e[1mprocess[flytos/dji_sdk_remap-3]: started with pid [28692]e[0m
e[1mprocess[flytos/core_api_param-4]: started with pid [28693]e[0m
e[1mprocess[flytos/core_api_setup-5]: started with pid [28699]e[0m
e[1mprocess[flytos/core_api_navigation-6]: started with pid [28706]e[0m
e[1mprocess[flytos/core_api_payload-7]: started with pid [28716]e[0m
e[1mprocess[flytos/navigation_server-8]: started with pid [28729]e[0m
e[1mprocess[flytos/rostful-9]: started with pid [28737]e[0m

  • python -tt -m rostful run -h 0.0.0.0 -p 80 -s tornado ‘–ros-arg=~connections_list:=/rocon/connection_cache/list’ ‘–ros-arg=~connections_diff:=/rocon/connection_cache/diff’ --ros-arg=__name:=rostful --ros-arg=__log:=/home/nvidia/.ros/log/e94cc29e-71e3-11e9-ba4f-00044b8d3fff/flytos-rostful-9.log
    e[1mprocess[flytos/rosapi-10]: started with pid [28749]e[0m
    e[1mprocess[flytos/flyt_cl-11]: started with pid [28757]e[0m
    e[1mprocess[flytos/flyt_ms_node-12]: started with pid [28766]e[0m
    e[0m[ INFO] [1557355932.110943806]: [DJI SDK] Advanced Sensing is Enabled on M210.e[0m

STATUS/1 @ init, L55: Attempting to open device /dev/ttyUSB0 with baudrate 921600…

STATUS/1 @ init, L65: …Serial started successfully.
registered capabilities (classes):

  • rosbridge_library.capabilities.call_service.CallService
  • rosbridge_library.capabilities.advertise.Advertise
  • rosbridge_library.capabilities.publish.Publish
  • rosbridge_library.capabilities.subscribe.Subscribe
  • <class ‘rosbridge_library.capabilities.defragmentation.Defragment’>
  • rosbridge_library.capabilities.advertise_service.AdvertiseService
  • rosbridge_library.capabilities.service_response.ServiceResponse
  • rosbridge_library.capabilities.unadvertise_service.UnadvertiseService
    e[0m[ INFO] [1557355932.212565923]: [DJI SDK] Succeeded to read from serial devicee[0m

STATUS/1 @ init, L55: Attempting to open device /dev/ttyUSB0 with baudrate 921600…

STATUS/1 @ init, L65: …Serial started successfully.
WARNING:root:ZMQ : Protobuf message implementation not found. Using pickle based protocol
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
e[0m[ INFO] [1557355932.906966220]: [LIC] license file valid, checking for date validitye[0m
e[0m[ INFO] [1557355932.907174378]: [LIC] license file valid, system date validity check donee[0m
[WARN] [1557355933.065965]: FLYT_CL: shutting down, disabled in config
e[0m[ INFO] [1557355933.127541608]: waitForService: Service [/flytos/dji_sdk/query_drone_version] has not been advertised, waiting…e[0m

STATUS/1 @ parseDroneVersionInfo, L706: Device Serial No. = 095XF1800200U0

STATUS/1 @ parseDroneVersionInfo, L708: Hardware = PM410

STATUS/1 @ parseDroneVersionInfo, L709: Firmware = 3.3.10.10
e[1m[flytos/flyt_cl-11] process has finished cleanly
log file: /home/nvidia/.ros/log/e94cc29e-71e3-11e9-ba4f-00044b8d3fff/flytos-flyt_cl-11*.loge[0m
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
/usr/local/lib/python2.7/dist-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)

INFO in main [/flyt/flytos/flytcore/lib/python2.7/dist-packages/rostful/main.py:73]:
arguments passed : host 0.0.0.0 port 80 config None ros_args (u’~connections_list:=/rocon/connection_cache/list’, u’~connections_diff:=/rocon/connection_cache/diff’, u’__name:=rostful’, u’__log:=/home/nvidia/.ros/log/e94cc29e-71e3-11e9-ba4f-00044b8d3fff/flytos-rostful-9.log’)

INFO:rostful:arguments passed : host 0.0.0.0 port 80 config None ros_args (u’~connections_list:=/rocon/connection_cache/list’, u’~connections_diff:=/rocon/connection_cache/diff’, u’__name:=rostful’, u’__log:=/home/nvidia/.ros/log/e94cc29e-71e3-11e9-ba4f-00044b8d3fff/flytos-rostful-9.log’)
WARNING:root:Setting up pyros ROS node…
WARNING:root:Setting up pyros actual client…

INFO in server [/flyt/flytos/flytcore/lib/python2.7/dist-packages/rostful/server.py:184]:
Starting Tornado server on 0.0.0.0:80

ERRORLOG/1 @ initVirtualRC, L1067: Virtual RC is not supported on this platform!

STATUS/1 @ init, L49: Looking for USB device…

STATUS/1 @ init, L65: Found 6 USB devices, identifying DJI device…

STATUS/1 @ init, L83: Found a DJI device…

STATUS/1 @ init, L96: Attempting to open DJI USB device…

STATUS/1 @ init, L134: …DJI USB device started successfully.

STATUS/1 @ activate, L1277: version 0x3030A0A

STATUS/1 @ activate, L1290: Activation successful

STATUS/1 @ verify, L244: Verify subscription successful.
STATUS/1 @ initGimbal, L869: Checking if gimbal is connected …
STATUS/1 @ startPackage, L350: Start package 0 result: 0.
STATUS/1 @ startPackage, L352: Package 0 info: freq=50, nTopics=1.

STATUS/1 @ removePackage, L468: Remove package 0 successful.
STATUS/1 @ initGimbal, L913: Gimbal not mounted!
e[0m[ INFO] [1557355938.527828099]: [DJI SDK] drone activatede[0m
e[0m[ INFO] [1557355938.838123214]: waitForService: Service [/flytos/dji_sdk/query_drone_version] is now available.e[0m
e[0m[ INFO] [1557355940.217660099]: [DJI SDK] Use legacy data broadcast to get telemetry data!e[0m
[ERROR] [1557355945.202593]: Unable to accept incoming connection. Reason: type object ‘RosbridgeWebSocket’ has no attribute ‘client_manager’

DEBUG in flask_views [/flyt/flytos/flytcore/lib/python2.7/dist-packages/rostful/flask_views.py:499]:
calling service /flytos/param/param_get_all with msg : {‘get_only_ap’: True, ‘fresh_pull’: False}

[ERROR] [1557355956.249783]: Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py”, line 63, in wrapper
return f(*args, **kwargs)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py”, line 149, in on_close
if cls.client_manager:
AttributeError: type object ‘RosbridgeWebSocket’ has no attribute ‘client_manager’

[WARN] [1557355957.150477]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.
[ERROR] [1557355959.661943]: Unable to accept incoming connection. Reason: type object ‘RosbridgeWebSocket’ has no attribute ‘client_manager’
[ERROR] [1557355961.589301]: Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py”, line 63, in wrapper
return f(*args, **kwargs)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py”, line 149, in on_close
if cls.client_manager:
AttributeError: type object ‘RosbridgeWebSocket’ has no attribute ‘client_manager’

[ERROR] [1557355962.067667]: Unable to accept incoming connection. Reason: type object ‘RosbridgeWebSocket’ has no attribute ‘client_manager’

DEBUG in flask_views [/flyt/flytos/flytcore/lib/python2.7/dist-packages/rostful/flask_views.py:499]:
calling service /flytos/param/param_get_all with msg : {‘get_only_ap’: True, ‘fresh_pull’: False}

Thank you for the help!

#27

Can you please take a screenshot of flytconsole main dashboard and post it here.
Can you please run the rostopic commands for all the telemetry APIs mentioned here: http://api.flytbase.com/?shell#get-attitude-quaternion

and report back with a list of telemetry APIs (attitude, position, state etc) which are fetching valid data

#28

Hi @srv-admin,

I just got the time to look back on this. The new version does gives me some hope.

I was able to control the M210 in the DJI Simulation but there are a few issues:

  1. Satellite shows only 5 but able to get GPS Lock; Nice.
  2. Voltage is showing 0V ;(

My questions are:

  1. How can I fix the above issues and also,
  2. Since this is the advance sensing version, how can I enable camera from the drop-down menu in the video section?

Let me know if you need anything.

Thanks.

-hann