Jetson-nano on quadcopter

Problem: Quadcopter gets armed, gets GPS location but I am not able to spin motors or lift it even one meter, I have tested udacidrone, dronekit-python, mavproxy.py, ardupilot in all cases it is not able to takeoff.

Definitely I am doing something wrong but after days of work I am still not able to figure out what should be changed and what I have to modify. I need help from experts in this area. On web I have not seen implementation of Jetson nano with quadcopter however NVIDIA’s redtail github (https://github.com/NVIDIA-AI-IOT/redtail) supports jetsonTX1 and TX2. There is some initiative for jetson nano (https://github.com/mtbsteve/redtail) however its not ready to implement and test.
I have tested this F450 assembly using FS-i6 transmitter and it fly’s , so there is no issue with quadcopter , it is something related to connection between jetson-nano and pixhawk .

I NEED HELP AND GUIDANCE FOR jetson-nano and pixhawk implementation on Quadcopter (please do not point me towards available solution for TX1, TX2, XAVIER or Pi4, I am exclusively trying to implement with nano). I have used the same jetson-nano for jetbots and door camera etc. so i am sure there is no problem or issue with jetson-nano

Companion computer: Jetson-nano
Quadcopter: F450 Frame + PXI PX4 Flight Control + 920KV Motor + GPS + FS-i6 Transmitter .

My detailed steps and screenshots are available in the below mentioned link.

https://github.com/ShubraChowdhury/jetson/blob/master/JetsonnanoPixhawk.pdf

https://snitchai.com/category/ai/
https://github.com/ShubraChowdhury/jetson/blob/master/JetsonnanoPixhawk.pdf

Any help/guidance on the above mentioned topic will lead to development of economical drone solution for farming…

Hi, from my experience 57600 it is too small baundwidth, try higher one for instance 115200, 500000 or more and has to be the same that you set for TELEM2 in GroundControl system. In my case not all commands where send with small value.

Also PX4 has preflight checks and are there any error when you try arm your drone?

If you’re using ROS/MAVROS, What results of following command?

rosrun mavros mavsafety arm

Just for info - Previous command has to be run after:

roslaunch mavros px4.launch fcu_url:="/dev/ttyTHS1:115200"

115200 - it can be any value that you set by GroundControl system for TELEM2 port

hi gskachkov,

after roslaunch mavros px4.launch fcu_url:="/dev/ttyTHS1:115200"

i executed the following
rosrun mavros mavsafety arm

but the output was [ WARN] [1580775072.027792221]: CMD: Command 400 – wait ack timeout

below is the detail:

dlinano@jetson-nano:~$ roslaunch mavros px4.launch fcu_url:="/dev/ttyTHS1:115200"
… logging to /home/dlinano/.ros/log/c8a113ea-46e2-11ea-a156-00044be61485/roslaunch-jetson-nano-8443.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.

started roslaunch server http://192.168.1.197:40125/

SUMMARY

CLEAR PARAMETERS

  • /mavros/

PARAMETERS

  • /mavros/cmd/use_comp_id_system_control: False
  • /mavros/conn/heartbeat_rate: 1.0
  • /mavros/conn/system_time_rate: 1.0
  • /mavros/conn/timeout: 10.0
  • /mavros/conn/timesync_rate: 10.0
  • /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
  • /mavros/distance_sensor/hrlv_ez4_pub/id: 0
  • /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
  • /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/laser_1_sub/id: 3
  • /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/laser_1_sub/subscriber: True
  • /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
  • /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
  • /mavros/distance_sensor/lidarlite_pub/id: 1
  • /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
  • /mavros/distance_sensor/lidarlite_pub/send_tf: True
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/sonar_1_sub/id: 2
  • /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/sonar_1_sub/subscriber: True
  • /mavros/fake_gps/eph: 2.0
  • /mavros/fake_gps/epv: 2.0
  • /mavros/fake_gps/fix_type: 3
  • /mavros/fake_gps/geo_origin/alt: 408.0
  • /mavros/fake_gps/geo_origin/lat: 47.3667
  • /mavros/fake_gps/geo_origin/lon: 8.55
  • /mavros/fake_gps/gps_rate: 5.0
  • /mavros/fake_gps/mocap_transform: True
  • /mavros/fake_gps/satellites_visible: 5
  • /mavros/fake_gps/tf/child_frame_id: fix
  • /mavros/fake_gps/tf/frame_id: map
  • /mavros/fake_gps/tf/listen: False
  • /mavros/fake_gps/tf/rate_limit: 10.0
  • /mavros/fake_gps/tf/send: False
  • /mavros/fake_gps/use_mocap: True
  • /mavros/fake_gps/use_vision: False
  • /mavros/fcu_protocol: v2.0
  • /mavros/fcu_url: /dev/ttyTHS1:115200
  • /mavros/gcs_url:
  • /mavros/global_position/child_frame_id: base_link
  • /mavros/global_position/frame_id: map
  • /mavros/global_position/gps_uere: 1.0
  • /mavros/global_position/rot_covariance: 99999.0
  • /mavros/global_position/tf/child_frame_id: base_link
  • /mavros/global_position/tf/frame_id: map
  • /mavros/global_position/tf/global_frame_id: earth
  • /mavros/global_position/tf/send: False
  • /mavros/global_position/use_relative_alt: True
  • /mavros/image/frame_id: px4flow
  • /mavros/imu/angular_velocity_stdev: 0.0003490659 // 0…
  • /mavros/imu/frame_id: base_link
  • /mavros/imu/linear_acceleration_stdev: 0.0003
  • /mavros/imu/magnetic_stdev: 0.0
  • /mavros/imu/orientation_stdev: 1.0
  • /mavros/landing_target/camera/fov_x: 2.0071286398
  • /mavros/landing_target/camera/fov_y: 2.0071286398
  • /mavros/landing_target/image/height: 480
  • /mavros/landing_target/image/width: 640
  • /mavros/landing_target/land_target_type: VISION_FIDUCIAL
  • /mavros/landing_target/listen_lt: False
  • /mavros/landing_target/mav_frame: LOCAL_NED
  • /mavros/landing_target/target_size/x: 0.3
  • /mavros/landing_target/target_size/y: 0.3
  • /mavros/landing_target/tf/child_frame_id: camera_center
  • /mavros/landing_target/tf/frame_id: landing_target
  • /mavros/landing_target/tf/listen: False
  • /mavros/landing_target/tf/rate_limit: 10.0
  • /mavros/landing_target/tf/send: True
  • /mavros/local_position/frame_id: map
  • /mavros/local_position/tf/child_frame_id: base_link
  • /mavros/local_position/tf/frame_id: map
  • /mavros/local_position/tf/send: False
  • /mavros/local_position/tf/send_fcu: False
  • /mavros/mission/pull_after_gcs: True
  • /mavros/mocap/use_pose: True
  • /mavros/mocap/use_tf: False
  • /mavros/odometry/fcu/odom_child_id_des: base_link
  • /mavros/odometry/fcu/odom_parent_id_des: map
  • /mavros/plugin_blacklist: [‘safety_area’, '…
  • /mavros/plugin_whitelist:
  • /mavros/px4flow/frame_id: px4flow
  • /mavros/px4flow/ranger_fov: 0.118682
  • /mavros/px4flow/ranger_max_range: 5.0
  • /mavros/px4flow/ranger_min_range: 0.3
  • /mavros/safety_area/p1/x: 1.0
  • /mavros/safety_area/p1/y: 1.0
  • /mavros/safety_area/p1/z: 1.0
  • /mavros/safety_area/p2/x: -1.0
  • /mavros/safety_area/p2/y: -1.0
  • /mavros/safety_area/p2/z: -1.0
  • /mavros/setpoint_accel/send_force: False
  • /mavros/setpoint_attitude/reverse_thrust: False
  • /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
  • /mavros/setpoint_attitude/tf/frame_id: map
  • /mavros/setpoint_attitude/tf/listen: False
  • /mavros/setpoint_attitude/tf/rate_limit: 50.0
  • /mavros/setpoint_attitude/use_quaternion: False
  • /mavros/setpoint_position/mav_frame: LOCAL_NED
  • /mavros/setpoint_position/tf/child_frame_id: target_position
  • /mavros/setpoint_position/tf/frame_id: map
  • /mavros/setpoint_position/tf/listen: False
  • /mavros/setpoint_position/tf/rate_limit: 50.0
  • /mavros/setpoint_raw/thrust_scaling: 1.0
  • /mavros/setpoint_velocity/mav_frame: LOCAL_NED
  • /mavros/startup_px4_usb_quirk: True
  • /mavros/sys/disable_diag: False
  • /mavros/sys/min_voltage: 10.0
  • /mavros/target_component_id: 1
  • /mavros/target_system_id: 1
  • /mavros/tdr_radio/low_rssi: 40
  • /mavros/time/time_ref_source: fcu
  • /mavros/time/timesync_avg_alpha: 0.6
  • /mavros/time/timesync_mode: MAVLINK
  • /mavros/vibration/frame_id: base_link
  • /mavros/vision_pose/tf/child_frame_id: vision_estimate
  • /mavros/vision_pose/tf/frame_id: odom
  • /mavros/vision_pose/tf/listen: False
  • /mavros/vision_pose/tf/rate_limit: 10.0
  • /mavros/vision_speed/listen_twist: True
  • /mavros/vision_speed/twist_cov: True
  • /mavros/wheel_odometry/child_frame_id: base_link
  • /mavros/wheel_odometry/count: 2
  • /mavros/wheel_odometry/frame_id: odom
  • /mavros/wheel_odometry/send_raw: True
  • /mavros/wheel_odometry/send_twist: False
  • /mavros/wheel_odometry/tf/child_frame_id: base_link
  • /mavros/wheel_odometry/tf/frame_id: odom
  • /mavros/wheel_odometry/tf/send: False
  • /mavros/wheel_odometry/use_rpm: False
  • /mavros/wheel_odometry/vel_error: 0.1
  • /mavros/wheel_odometry/wheel0/radius: 0.05
  • /mavros/wheel_odometry/wheel0/x: 0.0
  • /mavros/wheel_odometry/wheel0/y: -0.15
  • /mavros/wheel_odometry/wheel1/radius: 0.05
  • /mavros/wheel_odometry/wheel1/x: 0.0
  • /mavros/wheel_odometry/wheel1/y: 0.15
  • /rosdistro: melodic
  • /rosversion: 1.14.3

NODES
/
mavros (mavros/mavros_node)

auto-starting new master
process[master]: started with pid [8453]
ROS_MASTER_URI=http://192.168.1.197:11311

setting /run_id to c8a113ea-46e2-11ea-a156-00044be61485
process[rosout-1]: started with pid [8464]
started core service [/rosout]
process[mavros-2]: started with pid [8472]
[ INFO] [1580775046.924479140]: FCU URL: /dev/ttyTHS1:115200
[ INFO] [1580775046.928986343]: serial0: device: /dev/ttyTHS1 @ 115200 bps
[ INFO] [1580775046.929645616]: GCS bridge disabled
[ INFO] [1580775047.109460404]: Plugin 3dr_radio loaded
[ INFO] [1580775047.112788124]: Plugin 3dr_radio initialized
[ INFO] [1580775047.113044948]: Plugin actuator_control loaded
[ INFO] [1580775047.119060125]: Plugin actuator_control initialized
[ INFO] [1580775047.145194590]: Plugin adsb loaded
[ INFO] [1580775047.151669925]: Plugin adsb initialized
[ INFO] [1580775047.151970551]: Plugin altitude loaded
[ INFO] [1580775047.154174413]: Plugin altitude initialized
[ INFO] [1580775047.154421914]: Plugin cam_imu_sync loaded
[ INFO] [1580775047.155741502]: Plugin cam_imu_sync initialized
[ INFO] [1580775047.155992388]: Plugin command loaded
[ INFO] [1580775047.167573210]: Plugin command initialized
[ INFO] [1580775047.167861440]: Plugin companion_process_status loaded
[ INFO] [1580775047.172648904]: Plugin companion_process_status initialized
[ INFO] [1580775047.173049479]: Plugin debug_value loaded
[ INFO] [1580775047.182026801]: Plugin debug_value initialized
[ INFO] [1580775047.182165604]: Plugin distance_sensor blacklisted
[ INFO] [1580775047.182456907]: Plugin fake_gps loaded
[ INFO] [1580775047.206490324]: Plugin fake_gps initialized
[ INFO] [1580775047.206976836]: Plugin ftp loaded
[ INFO] [1580775047.219875735]: Plugin ftp initialized
[ INFO] [1580775047.220180215]: Plugin global_position loaded
[ INFO] [1580775047.250476831]: Plugin global_position initialized
[ INFO] [1580775047.250806728]: Plugin gps_rtk loaded
[ INFO] [1580775047.255801276]: Plugin gps_rtk initialized
[ INFO] [1580775047.256078517]: Plugin hil loaded
[ INFO] [1580775047.280172090]: Plugin hil initialized
[ INFO] [1580775047.280471831]: Plugin home_position loaded
[ INFO] [1580775047.287504199]: Plugin home_position initialized
[ INFO] [1580775047.287787689]: Plugin imu loaded
[ INFO] [1580775047.302260031]: Plugin imu initialized
[ INFO] [1580775047.302562480]: Plugin landing_target loaded
[ INFO] [1580775047.328796946]: Plugin landing_target initialized
[ INFO] [1580775047.329113353]: Plugin local_position loaded
[ INFO] [1580775047.342396629]: Plugin local_position initialized
[ INFO] [1580775047.342757255]: Plugin log_transfer loaded
[ INFO] [1580775047.348706182]: Plugin log_transfer initialized
[ INFO] [1580775047.349117850]: Plugin manual_control loaded
[ INFO] [1580775047.355169277]: Plugin manual_control initialized
[ INFO] [1580775047.355536310]: Plugin mocap_pose_estimate loaded
[ INFO] [1580775047.362855033]: Plugin mocap_pose_estimate initialized
[ INFO] [1580775047.363337847]: Plugin mount_control loaded
[ INFO] [1580775047.370414538]: Plugin mount_control initialized
[ INFO] [1580775047.370687612]: Plugin obstacle_distance loaded
[ INFO] [1580775047.376041277]: Plugin obstacle_distance initialized
[ INFO] [1580775047.376507893]: Plugin odom loaded
[ INFO] [1580775047.385115110]: Plugin odom initialized
[ INFO] [1580775047.385374017]: Plugin onboard_computer_status loaded
[ INFO] [1580775047.390120909]: Plugin onboard_computer_status initialized
[ INFO] [1580775047.390517264]: Plugin param loaded
[ INFO] [1580775047.396265305]: Plugin param initialized
[ INFO] [1580775047.396622181]: Plugin px4flow loaded
[ INFO] [1580775047.410084416]: Plugin px4flow initialized
[ INFO] [1580775047.410226864]: Plugin rangefinder blacklisted
[ INFO] [1580775047.410559990]: Plugin rc_io loaded
[ INFO] [1580775047.417425743]: Plugin rc_io initialized
[ INFO] [1580775047.417555327]: Plugin safety_area blacklisted
[ INFO] [1580775047.417833713]: Plugin setpoint_accel loaded
[ INFO] [1580775047.424036391]: Plugin setpoint_accel initialized
[ INFO] [1580775047.424370455]: Plugin setpoint_attitude loaded
[ INFO] [1580775047.442412080]: Plugin setpoint_attitude initialized
[ INFO] [1580775047.442745675]: Plugin setpoint_position loaded
[ INFO] [1580775047.471660879]: Plugin setpoint_position initialized
[ INFO] [1580775047.472081193]: Plugin setpoint_raw loaded
[ INFO] [1580775047.488842970]: Plugin setpoint_raw initialized
[ INFO] [1580775047.489247711]: Plugin setpoint_trajectory loaded
[ INFO] [1580775047.498803578]: Plugin setpoint_trajectory initialized
[ INFO] [1580775047.499179673]: Plugin setpoint_velocity loaded
[ INFO] [1580775047.510453774]: Plugin setpoint_velocity initialized
[ INFO] [1580775047.510942734]: Plugin sys_status loaded
[ INFO] [1580775047.529840300]: Plugin sys_status initialized
[ INFO] [1580775047.530337124]: Plugin sys_time loaded
[ INFO] [1580775047.541103464]: TM: Timesync mode: MAVLINK
[ INFO] [1580775047.544018214]: Plugin sys_time initialized
[ INFO] [1580775047.544296079]: Plugin trajectory loaded
[ INFO] [1580775047.555042366]: Plugin trajectory initialized
[ INFO] [1580775047.555484660]: Plugin vfr_hud loaded
[ INFO] [1580775047.557302010]: Plugin vfr_hud initialized
[ INFO] [1580775047.557415291]: Plugin vibration blacklisted
[ INFO] [1580775047.557648886]: Plugin vision_pose_estimate loaded
[ INFO] [1580775047.572347479]: Plugin vision_pose_estimate initialized
[ INFO] [1580775047.572746490]: Plugin vision_speed_estimate loaded
[ INFO] [1580775047.580529278]: Plugin vision_speed_estimate initialized
[ INFO] [1580775047.580934488]: Plugin waypoint loaded
[ INFO] [1580775047.589144672]: Plugin waypoint initialized
[ INFO] [1580775047.589258527]: Plugin wheel_odometry blacklisted
[ INFO] [1580775047.589526757]: Plugin wind_estimation loaded
[ INFO] [1580775047.591356242]: Plugin wind_estimation initialized
[ INFO] [1580775047.591466034]: Autostarting mavlink via USB on PX4
[ INFO] [1580775047.591572389]: Built-in SIMD instructions: ARM NEON
[ INFO] [1580775047.591637598]: Built-in MAVLink package version: 2019.11.11
[ INFO] [1580775047.591911349]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1580775047.591976765]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ WARN] [1580775072.027792221]: CMD: Command 400 – wait ack timeout

Solution for connecting Jetson-Nano to Pixhawk: (thanks to all who pitched in and a special thanks to ppoirier)
Result : Propeller rotated as programmed in simple_goto.py
Main issue: Firmware on Pixhawk required upgrade, this was suggested by “ppoirier” on ardupilot discussion forum (https://discuss.ardupilot.org/t/nvidia-jetson-nano-for-pixhawk/46052/30)
Suggestion: Upgraded from Autopilot Firmware version: APM:Copter-3.4.6 to Autopilot Firmware version: APM:Copter-4.0.1.
mtbsteve mentioned  https://github.com/mtbsteve/redtail is up and running along with a full implementation of the original Redtail project on Arducopter plus a bunch of enhancements.
https://discuss.ardupilot.org/t/nvidia-jetson-nano-for-pixhawk/46052/32

solution link:
https://www.snitchai.com/category/ai/

output results:
https://github.com/ShubraChowdhury/jetson