mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
910 stars 997 forks source link

Wrong movement using ArduRover and ROS navigation stack #1505

Open sammar80 opened 4 years ago

sammar80 commented 4 years ago

Issue details

I am using ArduRover with ROS navigation stack and although I can see a correct trajectory in rviz map once I send the goal to move base but the rover is not moving in the correct direction I checked and the conversion from ENU to NED is done by the setpoint_velocity.cpp plugin in mavros

MAVROS version and platform

Mavros: master ROS: Melodic Ubuntu: 18.04

Autopilot type and version

[ X ] ArduPilot [ ] PX4

Version: ArduRover V4.0.0 (0e52bafa)

Node logs

roslaunch mavros apm.launch fcu_url:=/dev/ttyACM0:921600 ... logging to /home/optimus/.ros/log/802f23ec-1d9a-11eb-87fe-d03745187cad/roslaunch-Autobot-32312.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://Autobot:39447/

SUMMARY

CLEAR PARAMETERS

PARAMETERS

NODES / mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [32350] [ INFO] [1604383666.477056764]: FCU URL: /dev/ttyACM0:921600 [ INFO] [1604383666.485917849]: serial0: device: /dev/ttyACM0 @ 921600 bps [ INFO] [1604383666.488025813]: GCS bridge disabled [ INFO] [1604383666.784134771]: Plugin 3dr_radio loaded [ INFO] [1604383666.793645402]: Plugin 3dr_radio initialized [ INFO] [1604383666.793879313]: Plugin actuator_control blacklisted [ INFO] [1604383666.946785203]: Plugin adsb loaded [ INFO] [1604383666.975207979]: Plugin adsb initialized [ INFO] [1604383666.975319700]: Plugin altitude blacklisted [ INFO] [1604383666.975715855]: Plugin cam_imu_sync loaded [ INFO] [1604383666.994185073]: Plugin cam_imu_sync initialized [ INFO] [1604383666.994817899]: Plugin command loaded [ INFO] [1604383667.065677724]: Plugin command initialized [ INFO] [1604383667.066222736]: Plugin companion_process_status loaded [ INFO] [1604383667.129832866]: Plugin companion_process_status initialized [ INFO] [1604383667.129942660]: Plugin debug_value blacklisted [ INFO] [1604383667.130001984]: Plugin distance_sensor blacklisted [ INFO] [1604383667.130475432]: Plugin esc_status loaded [ INFO] [1604383667.135064702]: Plugin esc_status initialized [ INFO] [1604383667.135717477]: Plugin fake_gps loaded [ INFO] [1604383667.233667651]: Plugin fake_gps initialized [ INFO] [1604383667.234173027]: Plugin ftp blacklisted [ INFO] [1604383667.234707779]: Plugin global_position loaded [ INFO] [1604383667.292947527]: Plugin global_position initialized [ INFO] [1604383667.293499936]: Plugin gps_rtk loaded [ INFO] [1604383667.305195511]: Plugin gps_rtk initialized [ INFO] [1604383667.305709273]: Plugin gps_status loaded [ INFO] [1604383667.315751634]: Plugin gps_status initialized [ INFO] [1604383667.315880335]: Plugin hil blacklisted [ INFO] [1604383667.316593737]: Plugin home_position loaded [ INFO] [1604383667.329179593]: Plugin home_position initialized [ INFO] [1604383667.330241961]: Plugin imu loaded [ INFO] [1604383667.356051969]: Plugin imu initialized [ INFO] [1604383667.356626825]: Plugin landing_target loaded [ INFO] [1604383667.403353450]: Plugin landing_target initialized [ INFO] [1604383667.404113728]: Plugin local_position loaded [ INFO] [1604383667.427421336]: Plugin local_position initialized [ INFO] [1604383667.427949108]: Plugin log_transfer loaded [ INFO] [1604383667.438477678]: Plugin log_transfer initialized [ INFO] [1604383667.439040243]: Plugin manual_control loaded [ INFO] [1604383667.451008429]: Plugin manual_control initialized [ INFO] [1604383667.451501722]: Plugin mocap_pose_estimate loaded [ INFO] [1604383667.464687539]: Plugin mocap_pose_estimate initialized [ INFO] [1604383667.465249791]: Plugin mount_control loaded [ INFO] [1604383667.478513059]: Plugin mount_control initialized [ INFO] [1604383667.478680719]: Plugin obstacle_distance blacklisted [ INFO] [1604383667.479650845]: Plugin odom loaded [ INFO] [1604383667.503766179]: Plugin odom initialized [ INFO] [1604383667.504244263]: Plugin onboard_computer_status loaded [ INFO] [1604383667.513161183]: Plugin onboard_computer_status initialized [ INFO] [1604383667.513883178]: Plugin param loaded [ INFO] [1604383667.526616017]: Plugin param initialized [ INFO] [1604383667.527119830]: Plugin play_tune loaded [ INFO] [1604383667.536060292]: Plugin play_tune initialized [ INFO] [1604383667.536348371]: Plugin px4flow blacklisted [ INFO] [1604383667.536834528]: Plugin rangefinder loaded [ INFO] [1604383667.539398231]: Plugin rangefinder initialized [ INFO] [1604383667.540737845]: Plugin rc_io loaded [ INFO] [1604383667.554026113]: Plugin rc_io initialized [ INFO] [1604383667.554201429]: Plugin safety_area blacklisted [ INFO] [1604383667.554722066]: Plugin setpoint_accel loaded [ INFO] [1604383667.564895420]: Plugin setpoint_accel initialized [ INFO] [1604383667.565693980]: Plugin setpoint_attitude loaded [ INFO] [1604383667.626996766]: Plugin setpoint_attitude initialized [ INFO] [1604383667.627584383]: Plugin setpoint_position loaded [ INFO] [1604383667.704133659]: Plugin setpoint_position initialized [ INFO] [1604383667.704713776]: Plugin setpoint_raw loaded [ INFO] [1604383667.741847581]: Plugin setpoint_raw initialized [ INFO] [1604383667.742404833]: Plugin setpoint_trajectory loaded [ INFO] [1604383667.761104785]: Plugin setpoint_trajectory initialized [ INFO] [1604383667.761715840]: Plugin setpoint_velocity loaded [ INFO] [1604383667.781171591]: Plugin setpoint_velocity initialized [ INFO] [1604383667.782252344]: Plugin sys_status loaded [ INFO] [1604383667.821293432]: Plugin sys_status initialized [ INFO] [1604383667.821853652]: Plugin sys_time loaded [ INFO] [1604383667.841213620]: TM: Timesync mode: MAVLINK [ INFO] [1604383667.846238576]: Plugin sys_time initialized [ INFO] [1604383667.846730202]: Plugin trajectory loaded [ INFO] [1604383667.864761285]: Plugin trajectory initialized [ INFO] [1604383667.865370049]: Plugin vfr_hud loaded [ INFO] [1604383667.868700124]: Plugin vfr_hud initialized [ INFO] [1604383667.868835856]: Plugin vibration blacklisted [ INFO] [1604383667.869261386]: Plugin vision_pose_estimate loaded [ INFO] [1604383667.899906139]: Plugin vision_pose_estimate initialized [ INFO] [1604383667.900092914]: Plugin vision_speed_estimate blacklisted [ INFO] [1604383667.900796315]: Plugin waypoint loaded [ INFO] [1604383667.922937543]: Plugin waypoint initialized [ INFO] [1604383667.923114995]: Plugin wheel_odometry blacklisted [ INFO] [1604383667.924174498]: Plugin wind_estimation loaded [ INFO] [1604383667.935716007]: Plugin wind_estimation initialized [ INFO] [1604383667.937436515]: Built-in SIMD instructions: ARM NEON [ INFO] [1604383667.937694281]: Built-in MAVLink package version: 2020.9.10 [ INFO] [1604383667.937931318]: Known MAVLink dialects: common ardupilotmega ASLUAV all autoquad icarous matrixpilot paparazzi standard uAvionix ualberta [ INFO] [1604383667.938121843]: MAVROS started. MY ID 1.240, TARGET ID 1.1 [ INFO] [1604383667.954146995]: RC_CHANNELS message detected! [ INFO] [1604383667.955971776]: IMU: Raw IMU message used. [ WARN] [1604383667.957418736]: IMU: linear acceleration on RAW_IMU known on APM only. [ WARN] [1604383667.958409695]: IMU: ~imu/data_raw stores unscaled raw acceleration report. [ WARN] [1604383667.961033140]: GP: No GPS fix [ WARN] [1604383667.963039227]: TM: Wrong FCU time. [ INFO] [1604383668.362075345]: FCU: EKF2 IMU0 is using external nav data [ INFO] [1604383668.363317404]: FCU: EKF2 IMU0 initial pos NED = -0.0,0.0,-0.0 (m) [ INFO] [1604383668.365834075]: FCU: EKF2 IMU0 ext nav yaw alignment complete [ INFO] [1604383668.367967196]: FCU: EKF2 IMU1 is using external nav data [ INFO] [1604383668.369335977]: FCU: EKF2 IMU1 initial pos NED = -0.0,0.0,-0.0 (m) [ INFO] [1604383668.370588193]: FCU: EKF2 IMU1 ext nav yaw alignment complete [ INFO] [1604383668.749626257]: CON: Got HEARTBEAT, connected. FCU: ArduPilot [ INFO] [1604383668.753458895]: RC_CHANNELS message detected! [ INFO] [1604383669.708112834]: FCU: Set HOME to 0.000003 0.000003 at -0.01m [ WARN] [1604383669.762217020]: CMD: Unexpected command 520, result 0 [ INFO] [1604383669.764672492]: WP: Using MISSION_ITEM_INT [ INFO] [1604383669.765349226]: VER: 1.1: Capabilities 0x000000000000f1ef [ INFO] [1604383669.765920906]: VER: 1.1: Flight software: 040000ff ( 0e52baf) [ INFO] [1604383669.766339769]: VER: 1.1: Middleware software: 00000000 ( ) [ INFO] [1604383669.766696913]: VER: 1.1: OS software: 00000000 ( 0997003) [ INFO] [1604383669.767053171]: VER: 1.1: Board hardware: 00000000 [ INFO] [1604383669.767426460]: VER: 1.1: VID/PID: 0000:0000 [ INFO] [1604383669.768633311]: VER: 1.1: UID: 0000000000000000 [ WARN] [1604383673.548312875]: TM : RTT too high for timesync: 401.91 ms. [ INFO] [1604383678.757269718]: FCU: ArduRover V4.0.0 (0e52bafa) [ INFO] [1604383678.757956977]: FCU: ChibiOS: 0997003f [ INFO] [1604383678.758387510]: FCU: Pixracer 00330026 374E5005 2031384B [ INFO] [1604383683.757857354]: WP: mission received [ WARN] [1604383690.168471355]: TM : RTT too high for timesync: 522.12 ms. [ WARN] [1604383690.949640565]: TM : RTT too high for timesync: 203.25 ms. [ INFO] [1604383690.950290948]: PR: parameters list received [ WARN] [1604383693.723605856]: TM : RTT too high for timesync: 177.21 ms. [ WARN] [1604383698.050486202]: GP: No GPS fix [ WARN] [1604383701.133954197]: TM : RTT too high for timesync: 187.58 ms. [ WARN] [1604383709.433121584]: TM : RTT too high for timesync: 286.75 ms. [ WARN] [1604383714.909394585]: TM : RTT too high for timesync: 162.95 ms. [ WARN] [1604383728.051014800]: GP: No GPS fix [ WARN] [1604383736.234291346]: TM : RTT too high for timesync: 187.93 ms. [ WARN] [1604383744.115348399]: TM : RTT too high for timesync: 368.32 ms. [ WARN] [1604383748.513256131]: TM : RTT too high for timesync: 166.88 ms. [ WARN] [1604383758.157722746]: GP: No GPS fix [ WARN] [1604383765.759491412]: TM : RTT too high for timesync: 13.09 ms.

Diagnostics

rostopic echo -n1 /diagnostics

header: seq: 20 stamp: secs: 1604391654 nsecs: 20940989 frame_id: '' status:

rosrun mavros checkid OK. I got messages from 1:1.


Received 3485 messages, from 2 addresses sys:comp list of messages 255:190 0, 66, 111 1:1 0, 1, 2, 193, 152, 150, 24, 27, 29, 30, 32, 33, 34, 163, 36, 165, 42, 178, 182, 62, 65, 74, 111, 241, 116, 125

Alex-Beh commented 3 years ago

Hello, may I know the board that you using?

sammar80 commented 3 years ago

@Alex-Beh for the companion computer we are using NVIDIA Jetson nano integeated with pixracer for ardupilot

chiragmakwana0296 commented 3 years ago

Thats Probably due to setpoint_velocity mav_frame is set to LOCAL_NED Set it to BODY_NED in apm_config.yaml or change it using:

rosservice call /mavros/setpoint_velocity/mav_frame "mav_frame: 8"
sammar80 commented 3 years ago

@chiragmakwana0296 thanks a lot for your reply and sorry for the delay . I changed the mav_frame to BODY_NED and the problem was solved