Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mavros request fail issue #601

Closed
yunshin opened this issue Sep 18, 2016 · 2 comments
Closed

Mavros request fail issue #601

yunshin opened this issue Sep 18, 2016 · 2 comments
Labels

Comments

@yunshin
Copy link

yunshin commented Sep 18, 2016

Hello.
I'm trying to connect pixhawk to Nvidia jetson TX1 board.
I installed ROS Indigo including mavros on TX1.
However, everytime I try to use command:$ mavros mavsys mode -c OFFBOARD, it says mavros request fail.
When I type $dmesg

1

So I set fcu_url value to /dev/ttyACM0:57600 in my px4.launch file as below.

2

After then, I run roscore and roslaunch mavros px4.launch

`ubuntu@tegra-ubuntu:~/ros_catkin_ws/install_isolated/share/mavros/launch$ roslaunch mavros px4.launch
... logging to /home/ubuntu/.ros/log/896a075a-7d95-11e6-9e8c-00044b5809b8/roslaunch-tegra-ubuntu-1295.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.21:33842/

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/fcu_url: /dev/ttyACM0:57600
  • /mavros/gcs_url:
  • /mavros/global_position/frame_id: fcu
  • /mavros/global_position/rot_covariance: 99999.0
  • /mavros/global_position/tf/child_frame_id: fcu_utm
  • /mavros/global_position/tf/frame_id: local_origin
  • /mavros/global_position/tf/send: False
  • /mavros/image/frame_id: px4flow
  • /mavros/imu/angular_velocity_stdev: 0.000349065850399
  • /mavros/imu/frame_id: fcu
  • /mavros/imu/linear_acceleration_stdev: 0.0003
  • /mavros/imu/magnetic_stdev: 0.0
  • /mavros/imu/orientation_stdev: 1.0
  • /mavros/local_position/frame_id: fcu
  • /mavros/local_position/tf/child_frame_id: fcu
  • /mavros/local_position/tf/frame_id: local_origin
  • /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/plugin_blacklist: ['safety_area', '...
  • /mavros/plugin_whitelist: []
  • /mavros/px4flow/frame_id: px4flow
  • /mavros/px4flow/ranger_fov: 0.0
  • /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_throttle: False
  • /mavros/setpoint_attitude/tf/child_frame_id: attitude
  • /mavros/setpoint_attitude/tf/frame_id: local_origin
  • /mavros/setpoint_attitude/tf/listen: False
  • /mavros/setpoint_attitude/tf/rate_limit: 10.0
  • /mavros/setpoint_position/tf/child_frame_id: setpoint
  • /mavros/setpoint_position/tf/frame_id: local_origin
  • /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/vibration/frame_id: vibration
  • /mavros/vision_pose/tf/child_frame_id: vision
  • /mavros/vision_pose/tf/frame_id: local_origin
  • /mavros/vision_pose/tf/listen: False
  • /mavros/vision_pose/tf/rate_limit: 10.0
  • /mavros/vision_speed/listen_twist: False
  • /rosdistro: indigo
  • /rosversion: 1.11.20

NODES
/
mavros (mavros/mavros_node)

ROS_MASTER_URI=http://192.168.0.21:11311

core service [/rosout] found
process[mavros-1]: started with pid [1329]
[ INFO] [1474199232.933956237]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1474199232.934397689]: serial0: device: /dev/ttyACM0 @ 57600 bps
[ INFO] [1474199233.013188434]: GCS bridge disabled
[ INFO] [1474199233.136606797]: Plugin 3dr_radio loaded and initialized
[ INFO] [1474199233.147394097]: Plugin actuator_control loaded and initialized
[ INFO] [1474199233.151594092]: Plugin altitude loaded and initialized
[ INFO] [1474199233.416842076]: Plugin cam_imu_sync loaded and initialized
[ INFO] [1474199233.433452526]: Plugin command loaded and initialized
[ INFO] [1474199233.433578462]: Plugin distance_sensor blacklisted
[ INFO] [1474199233.459200976]: Plugin ftp loaded and initialized
[ INFO] [1474199233.485126506]: Plugin global_position loaded and initialized
[ INFO] [1474199233.487630222]: Plugin hil_controls loaded and initialized
[ INFO] [1474199233.487717616]: Plugin image_pub blacklisted
[ INFO] [1474199233.511452135]: Plugin imu_pub loaded and initialized
[ INFO] [1474199233.531940397]: Plugin local_position loaded and initialized
[ INFO] [1474199233.534377811]: Plugin manual_control loaded and initialized
[ INFO] [1474199233.549304534]: Plugin mocap_pose_estimate loaded and initialized
[ INFO] [1474199233.557574213]: Plugin param loaded and initialized
[ INFO] [1474199233.575298032]: Plugin px4flow loaded and initialized
[ INFO] [1474199233.588493060]: Plugin rc_io loaded and initialized
[ INFO] [1474199233.588586444]: Plugin safety_area blacklisted
[ INFO] [1474199233.600930025]: Plugin setpoint_accel loaded and initialized
[ INFO] [1474199233.641511189]: Plugin setpoint_attitude loaded and initialized
[ INFO] [1474199233.661666017]: Plugin setpoint_position loaded and initialized
[ INFO] [1474199233.694834938]: Plugin setpoint_raw loaded and initialized
[ INFO] [1474199233.704689855]: Plugin setpoint_velocity loaded and initialized
[ INFO] [1474199233.724599062]: Plugin sys_status loaded and initialized
[ INFO] [1474199233.736115519]: Plugin sys_time loaded and initialized
[ INFO] [1474199233.740434731]: Plugin vfr_hud loaded and initialized
[ INFO] [1474199233.740528115]: Plugin vibration blacklisted
[ INFO] [1474199233.769315690]: Plugin vision_pose_estimate loaded and initialized
[ INFO] [1474199233.782049265]: Plugin vision_speed_estimate loaded and initialized
[ INFO] [1474199233.794921798]: Plugin waypoint loaded and initialized
[ INFO] [1474199233.795055129]: Autostarting mavlink via USB on PX4
[ INFO] [1474199233.795149972]: Built-in SIMD instructions: None
[ INFO] [1474199233.795204867]: Built-in MAVLink package version: 2016.5.20
[ INFO] [1474199233.795247418]: Built-in MAVLink dialect: ardupilotmega
[ INFO] [1474199233.795292522]: MAVROS started. MY ID 1.240, TARGET ID 1.1
`
These are what I got. It does not seem to receive heartbeat. When I type 'rosrun mavros mavsys mode -c OFFBOARD' in this state, it says "Request failed. Check mavros logs".

I check dignostics message via
rostopic echo -n1 /diagnostics

`
header:
seq: 116
stamp:
secs: 1474199385
nsecs: 298692825
frame_id: ''
status:

level: 1
name: mavros: FCU connection
message: not connected
hardware_id: /dev/ttyACM0:57600
values:

key: Received packets:
value: 195
  • key: Dropped packets:
    value: 0
  • key: Buffer overruns:
    value: 0
  • key: Parse errors:
    value: 0
  • key: Rx sequence number:
    value: 97
  • key: Tx sequence number:
    value: 25
  • key: Rx total bytes:
    value: 8116
  • key: Tx total bytes:
    value: 41976
  • key: Rx speed:
    value: 0.000000
  • key: Tx speed:
    value: 397.000000
  • level: 2
    name: mavros: GPS
    message: No satellites
    hardware_id: /dev/ttyACM0:57600
    values:

    key: Satellites visible
    value: 0

    key: Fix type
    value: 0

    key: EPH (m)
    value: Unknown

    key: EPV (m)
    value: Unknown
  • level: 2
    name: mavros: Heartbeat
    message: No events recorded.
    hardware_id: /dev/ttyACM0:57600
    values:

    key: Heartbeats since startup
    value: 0

    key: Frequency (Hz)
    value: 0.000000

    key: Vehicle type
    value: Generic

    key: Autopilot type
    value: Generic

    key: Mode
    value: ''

    key: System status
    value: Uninit
  • level: 0
    name: mavros: System
    message: Normal
    hardware_id: /dev/ttyACM0:57600
    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 mavconn library. #1
    value: 0

    key: Errors count Pub/sub for Mavlink.msg #2
    value: 0

    key: Errors count Plugin loading functionality. #3
    value: 0

    key: Errors count Diagnostic mesages. #4
    value: 0
  • level: 2
    name: mavros: Battery
    message: No data
    hardware_id: /dev/ttyACM0:57600
    values:

    key: Voltage
    value: -1.00

    key: Current
    value: 0.0

    key: Remaining
    value: 0.0
  • level: 2
    name: mavros: Time Sync
    message: No events recorded.
    hardware_id: /dev/ttyACM0:57600
    values:

    key: Timesyncs since startup
    value: 0

    key: Frequency (Hz)
    value: 0.000000

    key: Last dt (ms)
    value: 0.000000

    key: Mean dt (ms)
    value: 0.000000

    key: Last system time (s)
    value: 0.000000000

    key: Time offset (s)
    value: 0.000000000

`
In Level 1, it says 'not connected'.
How can I fix this connection problem??
I tried to set baudrate as 57600, 921600 and 1152000 but it did not work.

  • I checked out that the connection between pixhawk and my desktop is fine. Only the connection between pixhawk and TX1 is the problem.
    Any advice will be very thankful to me.
@KKLaLaLa
Copy link

hi ,i have meet the same problem with you.I solve it though modify px4.launch file.
first you should us ls -a /dev to look which serial you use. ttyusb0 or ttyacm0.when i use ttyusb0.It have the same problem like you.if you use ttyacm0.then ecernthong will be ok.

@chaqing
Copy link

chaqing commented Oct 4, 2020

I meet the same problemwith you.Can you elaborate more?Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants