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

Offboard control timeout!! #1

Closed
ajithmaniac opened this issue Oct 2, 2015 · 14 comments
Closed

Offboard control timeout!! #1

ajithmaniac opened this issue Oct 2, 2015 · 14 comments

Comments

@ajithmaniac
Copy link

Hey Tanmay,
Checked your discussion in this issue mavlink/mavros#347
and I thought you would be right person to answer my question.

I'm having an ubuntu 14.04 OS running ROS Indigo(offboard computer) and I'm connected to the pixhawk autopilot using 3dr telemetry.

I followed the instructions in this page https://pixhawk.org/dev/ros/mavros_offboard and I'm trying to compile the custom C++ code in it to enable offboard control. I have lots of compilation errors. I guess i'm not including the right headers to it and there is no include statement in that code. Can you help me with the compiling of this custom C++ code??

Or if you can guide me in manually doing these steps instead of an automated code it'l be really helpful !!!

@ajithmaniac
Copy link
Author

I actually ran the roslaunch command and I'm connected to the autopilot already but the command
rosrun mavros mavsys mode -c OFFBOARD
is getting timeout error!!!

@tanmayshankar
Copy link
Owner

Hi @ajithmaniac ,

That code isn't complete - like you said, some of headers and other statements are missing.
I've written up some code for position and velocity setpoint control here in the hexcopter_autonomy repository on my github account. You should be able to clone that to your indigo workspace and build it, and just run the code from there. You might have to change some topics names.

@ajithmaniac
Copy link
Author

Hey tanmay I have issues with building your package can you help me by listing the steps to be followed in order to build it ? Sorry I'm a newbie to ROS...

@chenshiyuhit
Copy link

@ajithmaniac Hi,I have the same question.Have you solve it? Can you tell me how to solve it ,thanks.
The messages in the terminal as follows:
... logging to /home/csy/.ros/log/3f97b224-8207-11e5-9229-8ca982321d8c/roslaunch-UAV-14920.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://UAV:36084/

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/ttyUSB0:921600
  • /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/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.13

NODES
/
mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[mavros-1]: started with pid [14939]
[ INFO] [1446553445.447849278]: FCU URL: /dev/ttyUSB0:921600
[ INFO] [1446553445.448272210]: serial0: device: /dev/ttyUSB0 @ 921600 bps
[ INFO] [1446553445.449890749]: GCS bridge disabled
[ INFO] [1446553445.543687367]: Plugin 3dr_radio loaded and initialized
[ INFO] [1446553445.553285522]: Plugin actuator_control loaded and initialized
[ INFO] [1446553445.571180581]: Plugin command loaded and initialized
[ INFO] [1446553445.590069895]: Plugin ftp loaded and initialized
[ INFO] [1446553445.609956089]: Plugin global_position loaded and initialized
[ INFO] [1446553445.625807481]: Plugin imu_pub loaded and initialized
[ INFO] [1446553445.633663521]: Plugin local_position loaded and initialized
[ INFO] [1446553445.639793648]: Plugin param loaded and initialized
[ INFO] [1446553445.647094682]: Plugin rc_io loaded and initialized
[ INFO] [1446553445.647176301]: Plugin safety_area blacklisted
[ INFO] [1446553445.653656905]: Plugin setpoint_accel loaded and initialized
[ INFO] [1446553445.676090731]: Plugin setpoint_attitude loaded and initialized
[ INFO] [1446553445.685924374]: Plugin setpoint_position loaded and initialized
[ INFO] [1446553445.690108518]: Plugin setpoint_velocity loaded and initialized
[ INFO] [1446553445.700948318]: Plugin sys_status loaded and initialized
[ INFO] [1446553445.705967107]: Plugin sys_time loaded and initialized
[ INFO] [1446553445.708148186]: Plugin vfr_hud loaded and initialized
[ INFO] [1446553445.714949743]: Plugin waypoint loaded and initialized
[ INFO] [1446553445.715042118]: Autostarting mavlink via USB on PX4
[ INFO] [1446553445.715127348]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1446553445.715185464]: Built-in MAVLink dialect: ardupilotmega
[ INFO] [1446553445.715239829]: MAVROS started. MY ID [1, 240], TARGET ID [1, 1]
[ WARN] [1446553445.811989726]: TM: Clock skew detected (-1446552550.361677170 s). Hard syncing clocks.
[ INFO] [1446553446.365930856]: CON: Got HEARTBEAT, connected.
[ WARN] [1446553448.371303874]: VER: broadcast request timeout, retries left 4
[ WARN] [1446553449.370433030]: VER: broadcast request timeout, retries left 3
[ WARN] [1446553450.370332040]: VER: unicast request timeout, retries left 2
[ WARN] [1446553451.370527075]: VER: unicast request timeout, retries left 1
[ WARN] [1446553452.370166690]: VER: unicast request timeout, retries left 0
[ WARN] [1446553453.370552316]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ WARN] [1446553457.367333945]: PR: request list timeout, retries left 2
[ WARN] [1446553458.367772075]: PR: request list timeout, retries left 1
[ WARN] [1446553459.368964146]: PR: request list timeout, retries left 0
[ WARN] [1446553462.367230722]: WP: timeout, retries left 2
[ WARN] [1446553463.368486772]: WP: timeout, retries left 1
[ WARN] [1446553464.369822290]: WP: timeout, retries left 0
[ERROR] [1446553465.371142858]: WP: timed out.

@chenshiyuhit
Copy link

@ajithmaniac
[ INFO] [1446554628.352136543]: CON: Got HEARTBEAT, connected.
[ WARN] [1446554630.356374025]: VER: broadcast request timeout, retries left 4
[ WARN] [1446554631.357188434]: VER: broadcast request timeout, retries left 3
[ WARN] [1446554632.356797038]: VER: unicast request timeout, retries left 2
[ WARN] [1446554633.356993600]: VER: unicast request timeout, retries left 1
[ WARN] [1446554634.356886739]: VER: unicast request timeout, retries left 0
[ WARN] [1446554635.356707239]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ERROR] [1446554636.035270472]: FCU: REJECT OFFBOARD
[ERROR] [1446554638.055720675]: FCU: REJECT OFFBOARD
[ WARN] [1446554639.354015268]: PR: request list timeout, retries left 2
[ERROR] [1446554640.076810005]: FCU: REJECT OFFBOARD
[ WARN] [1446554640.355180862]: PR: request list timeout, retries left 1
[ WARN] [1446554641.356237733]: PR: request list timeout, retries left 0
[ERROR] [1446554642.048651530]: FCU: REJECT OFFBOARD
[ERROR] [1446554644.070786095]: FCU: REJECT OFFBOARD
[ WARN] [1446554644.354343151]: WP: timeout, retries left 2
[ WARN] [1446554645.355581932]: WP: timeout, retries left 1
[ERROR] [1446554646.091868245]: FCU: REJECT OFFBOARD
[ WARN] [1446554646.356863409]: WP: timeout, retries left 0
[ERROR] [1446554647.358206047]: WP: timed out.
[ERROR] [1446554648.061955139]: FCU: REJECT OFFBOARD
[ERROR] [1446554650.082134155]: FCU: REJECT OFFBOARD
[ERROR] [1446554652.102352002]: FCU: REJECT OFFBOARD
[ERROR] [1446554654.073359831]: FCU: REJECT OFFBOARD

@chenshiyuhit
Copy link

My pioxhawk formware version is not the latest, likely because this?

@ajithmaniac
Copy link
Author

I'm not using that code. I have a code which would stream setpoint to the mavros/setpoint_position/local topic and I manually switch to offboard mode after streaming setpoints

@ajithmaniac
Copy link
Author

Which code of his are you running??

@chenshiyuhit
Copy link

Thanks, where can get your code which would stream setpoint to the mavros/setpoint_position/local topic, and before switch to offboard mode, have you connect a GPS or vision model to the pixhawk?

@tanmayshankar
Copy link
Owner

Hi guys,

Sorry I hadn't seen this earlier.

To make the package, you just have to clone it into a rosbuild style workspace. Once you do that, try:
"rosmake hexcopter_autonomy"

@chenshiyuhit
Copy link

Maybe some bug with my code, so I can sure that the stream setpoint to the mavros/setpoint_position/local topic is right.

@ajithmaniac
Copy link
Author

'rosservice call mavros/cmd/guided_enable true' this command in terminal would change it to offboard. But before you do this you should stream setpoints to the setpoint_position/local/ topic. The setpoint streaming part of the authors code is right so you can just use it.

@chenshiyuhit
Copy link

@ajithmaniac Thanks a lot.

@chenshiyuhit
Copy link

@tanmayshankar Thanks a lot.

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

No branches or pull requests

3 participants