mavlink / mavros

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

setpoint_attitude still not publishing attitude in latest mavros #833

Closed SiddharthPatel45 closed 7 years ago

SiddharthPatel45 commented 7 years ago

Hi guys! @andresR8 @TSC21 @TSC21 @vooon I followed your work and thanks for all your effort as you posted in #821 and #817. I tried to use the /mavros/setpoint_attitude/ to publish attitude angles and throttle. I was not aware of the change in topic names and other features but after following this I found out that it has changed. Even with the latest mavros source install, I am not able to use this topic. I publish to mavros/setpoint_attitude/thrust and /mavros/setpoint_attitude/target_attitude topics to send quaternion and thrust command but mavros only subscribes to the thrust and not the attitude as can be seen from the rqt_graph below:

31380606-5c280e10-ade4-11e7-8ed4-7c1f269ee2c0

It is publishing the commands because when I run rostopic echo /mavros/setpoint_attitude/target_attitude I see the commands. I tried all the things you guys mentioned related to this. Changed the use_quaternion in the px4_config.yaml, tried

can you please try to replace https://github.com/mavlink/mavros/blob/master/mavros/src/plugins/setpoint_attitude.cpp#L112-L113 with std::shared_ptrs and recompile?

didnt work. And the other minor changes. Can you please let me know if you were able to solve this issue, how did you do it. That would be great. Thanks a lot.

PS: Previously I was using the debian built mavros and even the throttle was not publishing but just then I came across this issue and did source installation and atleast was able to send something but not all. Anyways, it would be great if you help me out here.

MAVROS version and platform

Mavros: ?0.21.2? ROS: ?Kinetic? Ubuntu: ?16.04?

Autopilot type and version

[ X ] PX4

Version: 1.6.5dev

Node logs

rostopic info /mavros/setpoint_attitude/target_attitude
Type: geometry_msgs/PoseStamped

Publishers: 
 * /pub_setpoints (http://fnn-ST:44347/)

Subscribers: 
 * /mavros (http://fnn-ST:36699/)
rostopic info /mavros/setpoint_attitude/thrust 
Type: mavros_msgs/Thrust

Publishers: 
 * /pub_setpoints (http://fnn-ST:44347/)

Subscribers: 
 * /mavros (http://fnn-ST:36699/)

roslaunch: Also, what is this unexpectedd command at the end. I get it everytime even without sending any commands

... logging to /home/fnn/.ros/log/286dbe58-ae39-11e7-bab8-30f77280179f/roslaunch-fnn-ST-11545.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://fnn-ST:40747/

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: ROLL_180
 * /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: ROLL_180
 * /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: ROLL_180
 * /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: ROLL_180
 * /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_url: udp://:14540@127....
 * /mavros/gcs_url: 
 * /mavros/global_position/frame_id: map
 * /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: ['safety_area', '...
 * /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: True
 * /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/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: map
 * /mavros/vision_pose/tf/listen: False
 * /mavros/vision_pose/tf/rate_limit: 10.0
 * /mavros/vision_speed/listen_twist: False
 * /rosdistro: kinetic
 * /rosversion: 1.12.7

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to 286dbe58-ae39-11e7-bab8-30f77280179f
process[rosout-1]: started with pid [11569]
started core service [/rosout]
process[mavros-2]: started with pid [11587]
[ INFO] [1507694617.827859843]: FCU URL: udp://:14540@127.0.0.1:14557
[ WARN] [1507694617.828714865]: init: message from ASLUAV, MSG-ID 201 ignored! Table has different entry.
[ WARN] [1507694617.828961803]: init: message from autoquad, MSG-ID 150 ignored! Table has different entry.
[ WARN] [1507694617.828988338]: init: message from autoquad, MSG-ID 152 ignored! Table has different entry.
[ WARN] [1507694617.829134483]: init: message from matrixpilot, MSG-ID 150 ignored! Table has different entry.
[ WARN] [1507694617.829144199]: init: message from matrixpilot, MSG-ID 151 ignored! Table has different entry.
[ WARN] [1507694617.829153789]: init: message from matrixpilot, MSG-ID 152 ignored! Table has different entry.
[ WARN] [1507694617.829162984]: init: message from matrixpilot, MSG-ID 153 ignored! Table has different entry.
[ WARN] [1507694617.829185612]: init: message from matrixpilot, MSG-ID 155 ignored! Table has different entry.
[ WARN] [1507694617.829209134]: init: message from matrixpilot, MSG-ID 156 ignored! Table has different entry.
[ WARN] [1507694617.829217991]: init: message from matrixpilot, MSG-ID 157 ignored! Table has different entry.
[ WARN] [1507694617.829226832]: init: message from matrixpilot, MSG-ID 158 ignored! Table has different entry.
[ WARN] [1507694617.829235738]: init: message from matrixpilot, MSG-ID 170 ignored! Table has different entry.
[ WARN] [1507694617.829245122]: init: message from matrixpilot, MSG-ID 171 ignored! Table has different entry.
[ WARN] [1507694617.829254972]: init: message from matrixpilot, MSG-ID 172 ignored! Table has different entry.
[ WARN] [1507694617.829264621]: init: message from matrixpilot, MSG-ID 173 ignored! Table has different entry.
[ WARN] [1507694617.829273146]: init: message from matrixpilot, MSG-ID 174 ignored! Table has different entry.
[ WARN] [1507694617.829282006]: init: message from matrixpilot, MSG-ID 175 ignored! Table has different entry.
[ WARN] [1507694617.829292029]: init: message from matrixpilot, MSG-ID 176 ignored! Table has different entry.
[ WARN] [1507694617.829301027]: init: message from matrixpilot, MSG-ID 177 ignored! Table has different entry.
[ WARN] [1507694617.829309808]: init: message from matrixpilot, MSG-ID 178 ignored! Table has different entry.
[ WARN] [1507694617.829319143]: init: message from matrixpilot, MSG-ID 179 ignored! Table has different entry.
[ WARN] [1507694617.829327420]: init: message from matrixpilot, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1507694617.829338816]: init: message from matrixpilot, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1507694617.829351992]: init: message from matrixpilot, MSG-ID 182 ignored! Table has different entry.
[ WARN] [1507694617.829365622]: init: message from matrixpilot, MSG-ID 183 ignored! Table has different entry.
[ WARN] [1507694617.829375975]: init: message from matrixpilot, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1507694617.829385640]: init: message from matrixpilot, MSG-ID 185 ignored! Table has different entry.
[ WARN] [1507694617.829394683]: init: message from matrixpilot, MSG-ID 186 ignored! Table has different entry.
[ WARN] [1507694617.829532090]: init: message from paparazzi, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1507694617.829541768]: init: message from paparazzi, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1507694617.829550784]: init: message from paparazzi, MSG-ID 182 ignored! Table has different entry.
[ WARN] [1507694617.829584181]: init: message from paparazzi, MSG-ID 183 ignored! Table has different entry.
[ WARN] [1507694617.829595459]: init: message from paparazzi, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1507694617.829730344]: init: message from slugs, MSG-ID 170 ignored! Table has different entry.
[ WARN] [1507694617.829740464]: init: message from slugs, MSG-ID 172 ignored! Table has different entry.
[ WARN] [1507694617.829749638]: init: message from slugs, MSG-ID 173 ignored! Table has different entry.
[ WARN] [1507694617.829758829]: init: message from slugs, MSG-ID 176 ignored! Table has different entry.
[ WARN] [1507694617.829767630]: init: message from slugs, MSG-ID 177 ignored! Table has different entry.
[ WARN] [1507694617.829776591]: init: message from slugs, MSG-ID 179 ignored! Table has different entry.
[ WARN] [1507694617.829785356]: init: message from slugs, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1507694617.829794331]: init: message from slugs, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1507694617.829803056]: init: message from slugs, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1507694617.829813384]: init: message from slugs, MSG-ID 185 ignored! Table has different entry.
[ WARN] [1507694617.829822357]: init: message from slugs, MSG-ID 186 ignored! Table has different entry.
[ WARN] [1507694617.829831533]: init: message from slugs, MSG-ID 188 ignored! Table has different entry.
[ WARN] [1507694617.829843514]: init: message from slugs, MSG-ID 191 ignored! Table has different entry.
[ WARN] [1507694617.829852559]: init: message from slugs, MSG-ID 192 ignored! Table has different entry.
[ WARN] [1507694617.829861371]: init: message from slugs, MSG-ID 193 ignored! Table has different entry.
[ WARN] [1507694617.829870274]: init: message from slugs, MSG-ID 194 ignored! Table has different entry.
[ INFO] [1507694617.830478392]: udp0: Bind address: 0.0.0.0:14540
[ INFO] [1507694617.830529927]: udp0: Remote address: 127.0.0.1:14557
[ INFO] [1507694617.830735555]: GCS bridge disabled
[ INFO] [1507694617.834420718]: udp0: Remote address: 127.0.0.1:14557
[ INFO] [1507694617.876773600]: Plugin 3dr_radio loaded
[ INFO] [1507694617.879426057]: Plugin 3dr_radio initialized
[ INFO] [1507694617.879537583]: Plugin actuator_control loaded
[ INFO] [1507694617.883322211]: Plugin actuator_control initialized
[ INFO] [1507694617.919566672]: Plugin adsb loaded
[ INFO] [1507694617.924535382]: Plugin adsb initialized
[ INFO] [1507694617.924891018]: Plugin altitude loaded
[ INFO] [1507694617.926430949]: Plugin altitude initialized
[ INFO] [1507694617.926596707]: Plugin cam_imu_sync loaded
[ INFO] [1507694617.927305164]: Plugin cam_imu_sync initialized
[ INFO] [1507694617.927532084]: Plugin command loaded
[ INFO] [1507694617.933697582]: Plugin command initialized
[ INFO] [1507694617.933764902]: Plugin distance_sensor blacklisted
[ INFO] [1507694617.933991722]: Plugin fake_gps loaded
[ INFO] [1507694617.949402877]: Plugin fake_gps initialized
[ INFO] [1507694617.949712136]: Plugin ftp loaded
[ INFO] [1507694617.958246589]: Plugin ftp initialized
[ INFO] [1507694617.958496887]: Plugin global_position loaded
[ INFO] [1507694617.974783678]: Plugin global_position initialized
[ INFO] [1507694617.974949917]: Plugin hil loaded
[ INFO] [1507694617.992410042]: Plugin hil initialized
[ INFO] [1507694617.992593054]: Plugin home_position loaded
[ INFO] [1507694617.997955027]: Plugin home_position initialized
[ INFO] [1507694617.998143440]: Plugin imu loaded
[ INFO] [1507694618.006527469]: Plugin imu initialized
[ INFO] [1507694618.006726481]: Plugin local_position loaded
[ INFO] [1507694618.012808818]: Plugin local_position initialized
[ INFO] [1507694618.012968510]: Plugin manual_control loaded
[ INFO] [1507694618.013744173]: Plugin manual_control initialized
[ INFO] [1507694618.013891574]: Plugin mocap_pose_estimate loaded
[ INFO] [1507694618.018220858]: Plugin mocap_pose_estimate initialized
[ INFO] [1507694618.018428554]: Plugin odom loaded
[ INFO] [1507694618.023196102]: Plugin odom initialized
[ INFO] [1507694618.023449611]: Plugin param loaded
[ INFO] [1507694618.026216649]: Plugin param initialized
[ INFO] [1507694618.026439541]: Plugin px4flow loaded
[ INFO] [1507694618.031964575]: Plugin px4flow initialized
[ INFO] [1507694618.031992616]: Plugin rangefinder blacklisted
[ INFO] [1507694618.032222892]: Plugin rc_io loaded
[ INFO] [1507694618.036820559]: Plugin rc_io initialized
[ INFO] [1507694618.036867802]: Plugin safety_area blacklisted
[ INFO] [1507694618.037029597]: Plugin setpoint_accel loaded
[ INFO] [1507694618.042017318]: Plugin setpoint_accel initialized
[ INFO] [1507694618.042324190]: Plugin setpoint_attitude loaded
[ INFO] [1507694618.054281705]: Plugin setpoint_attitude initialized
[ INFO] [1507694618.054510877]: Plugin setpoint_position loaded
[ INFO] [1507694618.060503635]: Plugin setpoint_position initialized
[ INFO] [1507694618.060724079]: Plugin setpoint_raw loaded
[ INFO] [1507694618.070589120]: Plugin setpoint_raw initialized
[ INFO] [1507694618.070794692]: Plugin setpoint_velocity loaded
[ INFO] [1507694618.076795018]: Plugin setpoint_velocity initialized
[ INFO] [1507694618.077053798]: Plugin sys_status loaded
[ INFO] [1507694618.083621990]: Plugin sys_status initialized
[ INFO] [1507694618.083819562]: Plugin sys_time loaded
[ INFO] [1507694618.088015570]: TM: Timesync mode: MAVLINK
[ INFO] [1507694618.088970558]: Plugin sys_time initialized
[ INFO] [1507694618.089154313]: Plugin vfr_hud loaded
[ INFO] [1507694618.090897976]: Plugin vfr_hud initialized
[ INFO] [1507694618.090932408]: Plugin vibration blacklisted
[ INFO] [1507694618.091059594]: Plugin vision_pose_estimate loaded
[ INFO] [1507694618.100335070]: Plugin vision_pose_estimate initialized
[ INFO] [1507694618.100492901]: Plugin vision_speed_estimate loaded
[ INFO] [1507694618.104497036]: Plugin vision_speed_estimate initialized
[ INFO] [1507694618.104683182]: Plugin waypoint loaded
[ INFO] [1507694618.110175904]: Plugin waypoint initialized
[ INFO] [1507694618.110230938]: Autostarting mavlink via USB on PX4
[ INFO] [1507694618.110375365]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1507694618.110402066]: Built-in MAVLink package version: 2017.10.10
[ INFO] [1507694618.110426048]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1507694618.110455347]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1507694618.113893649]: IMU: High resolution IMU detected!
[ INFO] [1507694618.114692572]: IMU: Attitude quaternion IMU detected!
[ INFO] [1507694618.134436426]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1507694618.135679475]: IMU: High resolution IMU detected!
[ INFO] [1507694618.135887845]: IMU: Attitude quaternion IMU detected!
[ WARN] [1507694618.189649013]: TM: Clock skew detected (-1507693958.103775024 s). Hard syncing clocks.
[ INFO] [1507694619.136960997]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1507694619.137005162]: VER: 1.1: Flight software:     01060580 (00000000E1CE1A76)
[ INFO] [1507694619.137029665]: VER: 1.1: Middleware software: 01060580 (00000000E1CE1A76)
[ INFO] [1507694619.137050541]: VER: 1.1: OS software:         040a00ff (0000000000000000)
[ INFO] [1507694619.137068487]: VER: 1.1: Board hardware:      00000001
[ INFO] [1507694619.137096930]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1507694619.137115379]: VER: 1.1: UID:                 0000000100000002
[ WARN] [1507694619.137270410]: CMD: Unexpected command 520, result 0

Diagnostics

header: 
  seq: 370
  stamp: 
    secs: 1507695094
    nsecs: 111279504
  frame_id: ''
status: 
  - 
    level: 0
    name: mavros: FCU connection
    message: connected
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Received packets:
        value: 58331
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 253
      - 
        key: Tx sequence number:
        value: 233
      - 
        key: Rx total bytes:
        value: 7915823
      - 
        key: Tx total bytes:
        value: 246121
      - 
        key: Rx speed:
        value: 16554.000000
      - 
        key: Tx speed:
        value: 517.000000
  - 
    level: 0
    name: mavros: GPS
    message: 3D fix
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Satellites visible
        value: 10
      - 
        key: Fix type
        value: 3
      - 
        key: EPH (m)
        value: 0.00
      - 
        key: EPV (m)
        value: 0.00
  - 
    level: 0
    name: mavros: Heartbeat
    message: Normal
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Heartbeats since startup
        value: 476
      - 
        key: Frequency (Hz)
        value: 1.000027
      - 
        key: Vehicle type
        value: Quadrotor
      - 
        key: Autopilot type
        value: PX4 Autopilot
      - 
        key: Mode
        value: AUTO.LOITER
      - 
        key: System status
        value: Standby
  - 
    level: 0
    name: mavros: System
    message: Normal
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Sensor present
        value: 0x00000000
      - 
        key: Sensor enabled
        value: 0x00000000
      - 
        key: Sensor helth
        value: 0x00000000
      - 
        key: CPU Load (%)
        value: 0.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: 0
    name: mavros: Battery
    message: Normal
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Voltage
        value: 12.15
      - 
        key: Current
        value: -1.0
      - 
        key: Remaining
        value: 100.0
  - 
    level: 0
    name: mavros: Time Sync
    message: Normal
    hardware_id: udp://:14540@127.0.0.1:14557
    values: 
      - 
        key: Timesyncs since startup
        value: 4759
      - 
        key: Frequency (Hz)
        value: 10.000275
      - 
        key: Last dt (ms)
        value: 0.010577
      - 
        key: Mean dt (ms)
        value: -0.115670
      - 
        key: Last system time (s)
        value: 1135.656011000
      - 
        key: Time offset (s)
        value: 1507693958.434074163
---

Check ID

OK. I got messages from 1:1.

---
Received 5939 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 1, 2, 140, 141, 147, 24, 30, 31, 32, 33, 74, 76, 85, 87, 102, 230, 231, 105, 111, 241, 242, 245

Let me know if any more info is required. Thanks. Cheers!

vooon commented 7 years ago

What this command returns?

rosnode info /mavros
SiddharthPatel45 commented 7 years ago
rosnode info /mavros
--------------------------------------------------------------------------------
Node [/mavros]
Publications: 
 * /mavros/manual_control/control [mavros_msgs/ManualControl]
 * /mavros/adsb/vehicle [mavros_msgs/ADSBVehicle]
 * /tf [tf2_msgs/TFMessage]
 * /mavros/radio_status [mavros_msgs/RadioStatus]
 * /mavros/setpoint_raw/target_local [mavros_msgs/PositionTarget]
 * /mavros/imu/atm_pressure [sensor_msgs/FluidPressure]
 * /mavros/altitude [mavros_msgs/Altitude]
 * /mavros/global_position/compass_hdg [std_msgs/Float64]
 * /mavros/hil/actuator_controls [mavros_msgs/HilActuatorControls]
 * /mavros/global_position/global [sensor_msgs/NavSatFix]
 * /mavros/target_actuator_control [mavros_msgs/ActuatorControl]
 * /mavlink/from [mavros_msgs/Mavlink]
 * /mavros/local_position/pose [geometry_msgs/PoseStamped]
 * /mavros/imu/data [sensor_msgs/Imu]
 * /mavros/wind_estimation [geometry_msgs/TwistStamped]
 * /mavros/setpoint_raw/target_global [mavros_msgs/GlobalPositionTarget]
 * /tf_static [tf2_msgs/TFMessage]
 * /mavros/global_position/gp_origin [geographic_msgs/GeoPointStamped]
 * /mavros/imu/temperature [sensor_msgs/Temperature]
 * /mavros/px4flow/raw/optical_flow_rad [mavros_msgs/OpticalFlowRad]
 * /diagnostics [diagnostic_msgs/DiagnosticArray]
 * /mavros/global_position/raw/fix [sensor_msgs/NavSatFix]
 * /mavros/battery [sensor_msgs/BatteryState]
 * /mavros/setpoint_raw/target_attitude [mavros_msgs/AttitudeTarget]
 * /mavros/imu/data_raw [sensor_msgs/Imu]
 * /mavros/mission/waypoints [mavros_msgs/WaypointList]
 * /mavros/cam_imu_sync/cam_imu_stamp [mavros_msgs/CamIMUStamp]
 * /mavros/state [mavros_msgs/State]
 * /mavros/rc/in [mavros_msgs/RCIn]
 * /rosout [rosgraph_msgs/Log]
 * /mavros/global_position/local [nav_msgs/Odometry]
 * /mavros/vfr_hud [mavros_msgs/VFR_HUD]
 * /mavros/px4flow/ground_distance [sensor_msgs/Range]
 * /mavros/px4flow/temperature [sensor_msgs/Temperature]
 * /mavros/global_position/rel_alt [std_msgs/Float64]
 * /mavros/imu/mag [sensor_msgs/MagneticField]
 * /mavros/local_position/odom [nav_msgs/Odometry]
 * /mavros/extended_state [mavros_msgs/ExtendedState]
 * /mavros/hil/controls [mavros_msgs/HilControls]
 * /mavros/local_position/velocity [geometry_msgs/TwistStamped]
 * /mavros/global_position/gp_lp_offset [geometry_msgs/PoseStamped]
 * /mavros/global_position/raw/gps_vel [geometry_msgs/TwistStamped]
 * /mavros/rc/out [mavros_msgs/RCOut]
 * /mavros/home_position/home [mavros_msgs/HomePosition]
 * /mavros/time_reference [sensor_msgs/TimeReference]

Subscriptions: 
 * /mavros/actuator_control [unknown type]
 * /mavros/hil/optical_flow [unknown type]
 * /mavros/global_position/set_gp_origin [unknown type]
 * /tf [tf2_msgs/TFMessage]
 * /mavros/setpoint_raw/attitude [unknown type]
 * /mavros/hil/state [unknown type]
 * /mavros/global_position/home [unknown type]
 * /mavros/setpoint_velocity/cmd_vel [geometry_msgs/TwistStamped]
 * /mavros/hil/gps [unknown type]
 * /mavros/setpoint_accel/accel [unknown type]
 * /mavros/odometry/odom [unknown type]
 * /mavros/mocap/pose [geometry_msgs/PoseStamped]
 * /mavros/hil/imu_ned [unknown type]
 * /mavros/hil/rc_inputs [unknown type]
 * /tf_static [tf2_msgs/TFMessage]
 * /mavros/setpoint_raw/global [unknown type]
 * /mavros/vision_pose/pose_cov [unknown type]
 * /mavros/fake_gps/mocap/tf [unknown type]
 * /mavlink/to [unknown type]
 * /mavros/rc/override [unknown type]
 * /mavros/setpoint_attitude/target_attitude [geometry_msgs/PoseStamped]
 * /mavros/setpoint_raw/local [unknown type]
 * /mavros/setpoint_velocity/cmd_vel_unstamped [unknown type]
 * /mavros/vision_pose/pose [unknown type]
 * /mavros/setpoint_attitude/thrust [mavros_msgs/Thrust]
 * /mavros/setpoint_position/local [geometry_msgs/PoseStamped]
 * /clock [rosgraph_msgs/Clock]
 * /mavros/vision_speed/speed_vector [unknown type]
 * /mavros/adsb/send [unknown type]
 * /mavros/home_position/set [unknown type]

Services: 
 * /mavros/cmd/set_home
 * /mavros/param/get
 * /mavros/ftp/checksum
 * /mavros/cmd/land
 * /mavros/ftp/mkdir
 * /mavros/param/pull
 * /mavros/mission/push
 * /mavros/ftp/close
 * /mavros/ftp/rmdir
 * /mavros/ftp/list
 * /mavros/cmd/command_int
 * /mavros/param/push
 * /mavros/param/set
 * /mavros/cmd/takeoff
 * /mavros/ftp/truncate
 * /mavros/get_loggers
 * /mavros/home_position/req_update
 * /mavros/cmd/command
 * /mavros/ftp/open
 * /mavros/ftp/rename
 * /mavros/ftp/read
 * /mavros/ftp/remove
 * /mavros/ftp/reset
 * /mavros/mission/pull
 * /mavros/mission/clear
 * /mavros/set_stream_rate
 * /mavros/set_mode
 * /mavros/cmd/arming
 * /mavros/cmd/trigger_control
 * /mavros/set_logger_level
 * /mavros/mission/set_current
 * /mavros/ftp/write

contacting node http://fnn-ST:43285/ ...
Pid: 10305
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /mavros
    * direction: outbound
    * transport: INTRAPROCESS
 * topic: /tf_static
    * to: /mavros
    * direction: outbound
    * transport: INTRAPROCESS
 * topic: /mavros/state
    * to: /safe_y6
    * direction: outbound
    * transport: TCPROS
 * topic: /mavros/battery
    * to: /safe_y6
    * direction: outbound
    * transport: TCPROS
 * topic: /clock
    * to: /gazebo (http://fnn-ST:43251/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf
    * to: /mavros (http://fnn-ST:43285/)
    * direction: inbound
    * transport: INTRAPROCESS
 * topic: /tf_static
    * to: /mavros (http://fnn-ST:43285/)
    * direction: inbound
    * transport: INTRAPROCESS
 * topic: /mavros/mocap/pose
    * to: /fake_mocap (http://fnn-ST:33429/)
    * direction: inbound
    * transport: TCPROS
 * topic: /mavros/setpoint_attitude/thrust
    * to: /safe_y6 (http://fnn-ST:37465/)
    * direction: inbound
    * transport: TCPROS
 * topic: /mavros/setpoint_attitude/target_attitude
    * to: /safe_y6 (http://fnn-ST:37465/)
    * direction: inbound
    * transport: TCPROS
 * topic: /mavros/setpoint_position/local
    * to: /safe_y6 (http://fnn-ST:37465/)
    * direction: inbound
    * transport: TCPROS
 * topic: /mavros/setpoint_velocity/cmd_vel
    * to: /safe_y6 (http://fnn-ST:37465/)
    * direction: inbound
    * transport: TCPROS

Actually, I formatted my system and did a fresh install of everything and now the setpoint_atttitude command seems to work. Still it does not show up in the rqt_graph, it only shows /mavros/setpoint_attitude/thrust sending commands to /mavros. But the UAV goes in offboard and I am able to send commands using it. Sorry, I apologize for the trouble. Thanks for the help and effort @vooon.