mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
902 stars 993 forks source link

/mavros/setpoint_attitude/thrust not working #1173

Closed BhavyanshM closed 5 years ago

BhavyanshM commented 5 years ago

Issue details

Cannot get the ArduCopter to takeoff using the Python Mavros by setting the topic /mavros/setpoint_attitude/thrust with "thrust = 0.6" in the Guided_NoGPS mode.

MAVROS version and platform

Mavros: 0.28.0 ROS: Kinetic Ubuntu: ?16.04?

Autopilot type and version

[ X ] ArduPilot [ ] PX4

Version: Copter 3.5.7

Node logs

pi@AirStone:~/Workspace/dronekit/Bash $ roslaunch mavros.launch 
... logging to /home/pi/.ros/log/91adbe56-27fd-11e9-a7f6-b827eb79fcfb/roslaunch-AirStone-754.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.0.27:36675/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/cmd/use_comp_id_system_control: False
 * /mavros/conn/heartbeat_mav_type: ONBOARD_CONTROLLER
 * /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/rangefinder_pub/field_of_view: 0.0
 * /mavros/distance_sensor/rangefinder_pub/frame_id: lidar
 * /mavros/distance_sensor/rangefinder_pub/id: 0
 * /mavros/distance_sensor/rangefinder_pub/send_tf: False
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/x: 0.0
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/y: 0.0
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/z: -0.1
 * /mavros/distance_sensor/rangefinder_sub/id: 1
 * /mavros/distance_sensor/rangefinder_sub/orientation: PITCH_270
 * /mavros/distance_sensor/rangefinder_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: udp://:14650@
 * /mavros/gcs_url: udp://:14551@192....
 * /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.000349065850399
 * /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/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/estimator_type: 3
 * /mavros/odometry/frame_tf/desired_frame: ned
 * /mavros/plugin_blacklist: ['actuator_contro...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.118682389136
 * /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_velocity/mav_frame: LOCAL_NED
 * /mavros/startup_px4_usb_quirk: False
 * /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: map
 * /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
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to 91adbe56-27fd-11e9-a7f6-b827eb79fcfb
process[rosout-1]: started with pid [777]
started core service [/rosout]
process[mavros-2]: started with pid [792]
[ INFO] [1549230577.984011464]: FCU URL: udp://:14650@
[ INFO] [1549230578.006575439]: udp0: Bind address: 0.0.0.0:14650
[ INFO] [1549230578.008420588]: GCS URL: udp://:14551@192.168.0.9:14552
[ INFO] [1549230578.009926780]: udp1: Bind address: 0.0.0.0:14551
[ INFO] [1549230578.010621569]: udp0: Remote address: 127.0.0.1:38629
[ INFO] [1549230578.011270421]: udp1: Remote address: 192.168.0.9:14552
[ INFO] [1549230578.724178603]: Plugin 3dr_radio loaded
[ INFO] [1549230578.740373020]: Plugin 3dr_radio initialized
[ INFO] [1549230578.740698904]: Plugin actuator_control blacklisted
[ INFO] [1549230579.099722779]: Plugin adsb loaded
[ INFO] [1549230579.130761669]: Plugin adsb initialized
[ INFO] [1549230579.131306511]: Plugin altitude blacklisted
[ INFO] [1549230579.132904994]: Plugin cam_imu_sync loaded
[ INFO] [1549230579.139064294]: Plugin cam_imu_sync initialized
[ INFO] [1549230579.141224494]: Plugin command loaded
[ INFO] [1549230579.194392883]: Plugin command initialized
[ INFO] [1549230579.196256782]: Plugin companion_process_status loaded
[ INFO] [1549230579.221320227]: Plugin companion_process_status initialized
[ INFO] [1549230579.221833819]: Plugin debug_value blacklisted
[ INFO] [1549230579.223776884]: Plugin distance_sensor loaded
[ INFO] [1549230579.309351138]: Plugin distance_sensor initialized
[ INFO] [1549230579.311493005]: Plugin fake_gps loaded
[ INFO] [1549230579.456577498]: Plugin fake_gps initialized
[ INFO] [1549230579.457073694]: Plugin ftp blacklisted
[ INFO] [1549230579.459377019]: Plugin global_position loaded
[ INFO] [1549230579.621775612]: Plugin global_position initialized
[ INFO] [1549230579.623786178]: Plugin gps_rtk loaded
[ INFO] [1549230579.649569933]: Plugin gps_rtk initialized
[ INFO] [1549230579.650293159]: Plugin hil blacklisted
[ INFO] [1549230579.653256064]: Plugin home_position loaded
[ INFO] [1549230579.691356490]: Plugin home_position initialized
[ INFO] [1549230579.693794033]: Plugin imu loaded
[ INFO] [1549230579.771022694]: Plugin imu initialized
[ INFO] [1549230579.773577736]: Plugin local_position loaded
[ INFO] [1549230579.834883646]: Plugin local_position initialized
[ INFO] [1549230579.836839420]: Plugin log_transfer loaded
[ INFO] [1549230579.867117428]: Plugin log_transfer initialized
[ INFO] [1549230579.870032261]: Plugin manual_control loaded
[ INFO] [1549230579.902300626]: Plugin manual_control initialized
[ INFO] [1549230579.904394941]: Plugin mocap_pose_estimate loaded
[ INFO] [1549230579.944904994]: Plugin mocap_pose_estimate initialized
[ INFO] [1549230579.946844413]: Plugin obstacle_distance loaded
[ INFO] [1549230579.972635720]: Plugin obstacle_distance initialized
[ INFO] [1549230579.974588681]: Plugin odom loaded
[ INFO] [1549230580.031631743]: Plugin odom initialized
[ INFO] [1549230580.034404233]: Plugin param loaded
[ INFO] [1549230580.065782081]: Plugin param initialized
[ INFO] [1549230580.066355464]: Plugin px4flow blacklisted
[ INFO] [1549230580.069017329]: Plugin rangefinder loaded
[ INFO] [1549230580.076045792]: Plugin rangefinder initialized
[ INFO] [1549230580.078980624]: Plugin rc_io loaded
[ INFO] [1549230580.115845795]: Plugin rc_io initialized
[ INFO] [1549230580.116413658]: Plugin safety_area blacklisted
[ INFO] [1549230580.119378230]: Plugin setpoint_accel loaded
[ INFO] [1549230580.153431224]: Plugin setpoint_accel initialized
[ INFO] [1549230580.163474207]: Plugin setpoint_attitude loaded
[ INFO] [1549230580.281451358]: Plugin setpoint_attitude initialized
[ INFO] [1549230580.283773745]: Plugin setpoint_position loaded
[ INFO] [1549230580.425397264]: Plugin setpoint_position initialized
[ INFO] [1549230580.427457673]: Plugin setpoint_raw loaded
[ INFO] [1549230580.518539147]: Plugin setpoint_raw initialized
[ INFO] [1549230580.520864034]: Plugin setpoint_velocity loaded
[ INFO] [1549230580.579907818]: Plugin setpoint_velocity initialized
[ INFO] [1549230580.582648432]: Plugin sys_status loaded
[ INFO] [1549230580.680289568]: Plugin sys_status initialized
[ INFO] [1549230580.682267946]: Plugin sys_time loaded
[ INFO] [1549230580.739914808]: TM: Timesync mode: MAVLINK
[ INFO] [1549230580.752022731]: Plugin sys_time initialized
[ INFO] [1549230580.753848088]: Plugin trajectory loaded
[ INFO] [1549230580.809090897]: Plugin trajectory initialized
[ INFO] [1549230580.811412190]: Plugin vfr_hud loaded
[ INFO] [1549230580.817644250]: Plugin vfr_hud initialized
[ INFO] [1549230580.817927842]: Plugin vibration blacklisted
[ INFO] [1549230580.820608613]: Plugin vision_pose_estimate loaded
[ INFO] [1549230580.901731323]: Plugin vision_pose_estimate initialized
[ INFO] [1549230580.902013718]: Plugin vision_speed_estimate blacklisted
[ INFO] [1549230580.904157199]: Plugin waypoint loaded
[ INFO] [1549230580.949773847]: Plugin waypoint initialized
[ INFO] [1549230580.952009307]: Plugin wind_estimation loaded
[ INFO] [1549230580.958665480]: Plugin wind_estimation initialized
[ INFO] [1549230580.959452195]: Built-in SIMD instructions: None
[ INFO] [1549230580.959638757]: Built-in MAVLink package version: 2019.1.12
[ INFO] [1549230580.960072922]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1549230580.960347973]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ WARN] [1549230581.370432603]: TM : RTT too high for timesync: 18.32 ms.
[ INFO] [1549230581.373451550]: CON: Got HEARTBEAT, connected. FCU: ArduPilot - Plane/Copter/Rover/Sub/Tracker
[ INFO] [1549230581.390842682]: IMU: Raw IMU message used.
[ INFO] [1549230581.414494883]: RC_CHANNELS message detected!
[ WARN] [1549230581.419266427]: TM: Wrong FCU time.
[ WARN] [1549230581.892165662]: GP: No GPS fix
[ WARN] [1549230581.970393644]: TM : RTT too high for timesync: 18.32 ms.
[ INFO] [1549230582.411291236]: VER: 1.1: Capabilities         0x0000000000001bcf
[ INFO] [1549230582.411491131]: VER: 1.1: Flight software:     030507ff (b11c6af3)
[ INFO] [1549230582.411610557]: VER: 1.1: Middleware software: 00000000 (        )
[ INFO] [1549230582.412268784]: VER: 1.1: OS software:         00000000 (        )
[ INFO] [1549230582.412427638]: VER: 1.1: Board hardware:      00000000
[ INFO] [1549230582.412585710]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1549230582.412725137]: VER: 1.1: UID:                 0000000000000000
[ WARN] [1549230582.414206641]: CMD: Unexpected command 520, result 0
[ WARN] [1549230582.570400161]: TM : RTT too high for timesync: 17.26 ms.
[ WARN] [1549230583.170376525]: TM : RTT too high for timesync: 17.33 ms.
[ WARN] [1549230583.780370514]: TM : RTT too high for timesync: 27.96 ms.
[ WARN] [1549230584.370441457]: TM : RTT too high for timesync: 17.71 ms.
[ WARN] [1549230584.970423096]: TM : RTT too high for timesync: 18.31 ms.
[ WARN] [1549230585.570379274]: TM : RTT too high for timesync: 17.64 ms.
[ WARN] [1549230586.170428371]: TM : RTT too high for timesync: 18.19 ms.
[ WARN] [1549230586.780420145]: TM : RTT too high for timesync: 28.27 ms.
[ WARN] [1549230587.370446478]: TM : RTT too high for timesync: 17.71 ms.
[ WARN] [1549230587.970427099]: TM : RTT too high for timesync: 17.70 ms.
[ WARN] [1549230588.570409968]: TM : RTT too high for timesync: 17.66 ms.
[ WARN] [1549230589.170415808]: TM : RTT too high for timesync: 18.29 ms.
[ WARN] [1549230589.780406982]: TM : RTT too high for timesync: 28.17 ms.
[ WARN] [1549230590.370379588]: TM : RTT too high for timesync: 17.41 ms.
[ WARN] [1549230590.970414921]: TM : RTT too high for timesync: 17.67 ms.
[ INFO] [1549230591.375368220]: HP: requesting home position
[ INFO] [1549230591.390904465]: FCU: APM:Copter V3.5.7 (b11c6af3)
[ INFO] [1549230591.392083419]: FCU: Frame: QUAD
[ WARN] [1549230591.793469023]: TM : RTT too high for timesync: 241.31 ms.
[ INFO] [1549230592.181060566]: PR: parameters list received
[ WARN] [1549230592.183094152]: TM : RTT too high for timesync: 30.91 ms.
[ WARN] [1549230592.780377844]: TM : RTT too high for timesync: 28.07 ms.
[ WARN] [1549230593.370444588]: TM : RTT too high for timesync: 18.17 ms.
[ WARN] [1549230593.970415778]: TM : RTT too high for timesync: 17.61 ms.
[ WARN] [1549230594.570453121]: TM : RTT too high for timesync: 18.36 ms.
[ WARN] [1549230595.170421039]: TM : RTT too high for timesync: 18.20 ms.
[ WARN] [1549230595.780369760]: TM : RTT too high for timesync: 28.23 ms.
[ WARN] [1549230596.370427621]: TM : RTT too high for timesync: 18.02 ms.
[ INFO] [1549230596.391036036]: WP: mission received
[ WARN] [1549230596.970419615]: TM : RTT too high for timesync: 18.31 ms.

Diagnostics

pi@AirStone:~/Workspace/dronekit/Python $ rostopic echo -n1 /diagnostics
header: 
  seq: 5195
  stamp: 
    secs: 1549234058
    nsecs: 462033853
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Received packets:"
        value: "11947"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "167"
      - 
        key: "Tx sequence number:"
        value: "110"
      - 
        key: "Rx total bytes:"
        value: "8428847"
      - 
        key: "Tx total bytes:"
        value: "1162066"
      - 
        key: "Rx speed:"
        value: "4627.000000"
      - 
        key: "Tx speed:"
        value: "494.000000"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Satellites visible"
        value: "0"
      - 
        key: "Fix type"
        value: "0"
      - 
        key: "EPH (m)"
        value: "99.99"
      - 
        key: "EPV (m)"
        value: "0.00"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "3478"
      - 
        key: "Frequency (Hz)"
        value: "1.000009"
      - 
        key: "Vehicle type"
        value: "Quadrotor"
      - 
        key: "Autopilot type"
        value: "ArduPilot - Plane/Copter/Rover/Sub/Tracker"
      - 
        key: "Mode"
        value: "STABILIZE"
      - 
        key: "System status"
        value: "Standby"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Sensor present"
        value: "0x0361FC0F"
      - 
        key: "Sensor enabled"
        value: "0x02619C0F"
      - 
        key: "Sensor helth"
        value: "0x0361FC0F"
      - 
        key: "3D gyro"
        value: "Ok"
      - 
        key: "3D accelerometer"
        value: "Ok"
      - 
        key: "3D magnetometer"
        value: "Ok"
      - 
        key: "absolute pressure"
        value: "Ok"
      - 
        key: "3D angular rate control"
        value: "Ok"
      - 
        key: "attitude stabilization"
        value: "Ok"
      - 
        key: "yaw position"
        value: "Ok"
      - 
        key: "motor outputs / control"
        value: "Ok"
      - 
        key: "rc receiver"
        value: "Ok"
      - 
        key: "AHRS subsystem health"
        value: "Ok"
      - 
        key: "Terrain subsystem health"
        value: "Ok"
      - 
        key: "Battery"
        value: "Ok"
      - 
        key: "CPU Load (%)"
        value: "9.0"
      - 
        key: "Drop rate (%)"
        value: "0.0"
      - 
        key: "Errors comm"
        value: "0"
      - 
        key: "Errors count #1"
        value: "0"
      - 
        key: "Errors count #2"
        value: "0"
      - 
        key: "Errors count #3"
        value: "0"
      - 
        key: "Errors count #4"
        value: "0"
  - 
    level: 1
    name: "mavros: Battery"
    message: "Low voltage"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Voltage"
        value: "0.00"
      - 
        key: "Current"
        value: "-18.0"
      - 
        key: "Remaining"
        value: "-7.0"
  - 
    level: 0
    name: "mavros: Time Sync"
    message: "Normal"
    hardware_id: "udp://:14650@"
    values: 
      - 
        key: "Timesyncs since startup"
        value: "34574"
      - 
        key: "Frequency (Hz)"
        value: "10.000100"
      - 
        key: "Last RTT (ms)"
        value: "17.891452"
      - 
        key: "Mean RTT (ms)"
        value: "18.644012"
      - 
        key: "Last remote time (s)"
        value: "4228.218858000"
      - 
        key: "Estimated time offset (s)"
        value: "0.000000000"
---

Check ID

OK. I got messages from 1:1.

---
Received 1443 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 1, 2, 150, 65, 152, 147, 22, 24, 27, 29, 30, 33, 163, 36, 165, 42, 178, 182, 62, 193, 74, 77, 35, 111, 241, 116, 125
Exception in thread Thread-2 (most likely raised during interpreter shutdown):Unhandled exception in thread started by 
sys.excepthook is missing
lost sys.stderr

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 754, in run
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/registration.py", line 275, in start
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/registration.py", line 307, in run
  File "/usr/lib/python2.7/threading.py", line 203, in release
<type 'exceptions.TypeError'>: 'NoneType' object is not callableException in thread Thread-4 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/timer.py", line 235, in run
  File "/home/pi/catkin_ws/src/mavros/mavros/scripts/checkid", line 90, in timer_cb
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/core.py", line 493, in signal_shutdown
  File "/usr/lib/python2.7/threading.py", line 946, in join

Python Script for Publishing the Setpoint Attitude Thrust

import rospy
from mavros_msgs.srv import SetMode
from mavros_msgs.srv import CommandBool
from mavros_msgs.srv import CommandTOL
from mavros_msgs.msg import Thrust
import time

pub = rospy.Publisher('/mavros/setpoint_attitude/thrust', Thrust, queue_size=10)
rospy.init_node('mavros_takeoff_python')
rate = rospy.Rate(10)

# Set Mode
print "\nSetting Mode"
rospy.wait_for_service('/mavros/set_mode')
try:
    change_mode = rospy.ServiceProxy('/mavros/set_mode', SetMode)
    response = change_mode(custom_mode="GUIDED_NOGPS")
    rospy.loginfo(response)
except rospy.ServiceException as e:
    print("Set mode failed: %s" %e)

# Arm
print "\nArming"
rospy.wait_for_service('/mavros/cmd/arming')
try:
    arming_cl = rospy.ServiceProxy('/mavros/cmd/arming', CommandBool)
    response = arming_cl(value = True)
    rospy.loginfo(response)
except rospy.ServiceException as e:
    print("Arming failed: %s" %e)

# Takeoff

thrust = Thrust()
thrust.thrust = 0.6
while not rospy.is_shutdown():
        rospy.loginfo(thrust)
        pub.publish(thrust)
        rate.sleep()

Output on Rostopic Echo on /mavros/setpoint_attitude/thrust when Python script is launched

pi@AirStone:~/Workspace/dronekit/Python $ python hover-land.py 

Setting Mode
[INFO] [1549234644.448172]: mode_sent: True

Arming
[INFO] [1549234644.482689]: success: True
result: 0
[INFO] [1549234644.488615]: header: 
  seq: 0
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
thrust: 0.6
[INFO] [1549234644.519898]: header: 
  seq: 0
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
thrust: 0.6
[INFO] [1549234644.619861]: header: 
  seq: 0
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
thrust: 0.6
[INFO] [1549234644.720081]: header: 
  seq: 1
  stamp: 
    secs: 0
    nsecs:         0
  frame_id: ''
thrust: 0.6

Please help fixing this issue. We are currently on a time crunch and would appreciate all the help possible.

TSC21 commented 5 years ago

Please use the Ardupilot forums before posting something here. It's not clear from what you post if this is a an issue related with MAVROS.

BhavyanshM commented 5 years ago

Please use the Ardupilot forums before posting something here. It's not clear from what you post if this is a an issue related with MAVROS.

Oh alright, I will post the issue on the ArduPilot forum first.

BhavyanshM commented 5 years ago

Please use the Ardupilot forums before posting something here. It's not clear from what you post if this is a an issue related with MAVROS.

Oh alright, I will post the issue on the ArduPilot forum first.

Could you please direct me to the proper thread for such an issue though?

mhkabir commented 5 years ago

discuss.ardupilot.org