Closed iamrajee closed 2 years ago
When I tried with slam, then also it does not works: Terminal 1: roslaunch rtabmap_drone_example gazebo.launch Terminal 2: roslaunch rtabmap_drone_example slam.launch Terminal 3: roslaunch rtabmap_drone_example rviz.launch Terminal 4: rosrun rtabmap_drone_example offboard
See this video, where I describe the issue. Any lead on what might be causing this issue would be of great help, thank you.
Here is my log on px4 terminal, it seems the flight software version is different. The EKF on your side is also not initialized.
[ INFO] [1639074645.906335780, 2.179000000]: GF: Using MISSION_ITEM_INT
[ INFO] [1639074645.906392478, 2.179000000]: RP: Using MISSION_ITEM_INT
[ INFO] [1639074645.906424167, 2.179000000]: WP: Using MISSION_ITEM_INT
[ INFO] [1639074645.906462046, 2.179000000]: VER: 1.1: Capabilities 0x000000000000e4ef
[ INFO] [1639074645.906490792, 2.179000000]: VER: 1.1: Flight software: 010c03ff (2e8918da66000000)
[ INFO] [1639074645.906522457, 2.179000000]: VER: 1.1: Middleware software: 010c03ff (2e8918da66000000)
[ INFO] [1639074645.906548027, 2.179000000]: VER: 1.1: OS software: 050b00ff (bf660cba2af81f05)
[ INFO] [1639074645.906574252, 2.179000000]: VER: 1.1: Board hardware: 00000001
[ INFO] [1639074645.906596910, 2.179000000]: VER: 1.1: VID/PID: 0000:0000
[ INFO] [1639074645.906620395, 2.179000000]: VER: 1.1: UID: 4954414c44494e4f
INFO [ecl/EKF] 4080000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
[ INFO] [1639074648.021382750, 4.291000000]: IMU: Attitude quaternion IMU detected!
INFO [ecl/EKF] 4148000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
INFO [ecl/EKF] 7080000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
INFO [ecl/EKF] 7084000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
INFO [ecl/EKF] 7084000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
INFO [ecl/EKF] 7088000: EKF aligned, (baro hgt, IMU buf: 21, OBS buf: 15)
[ INFO] [1639074654.927322356, 11.171000000]: HP: requesting home position
INFO [gyro_calibration] gyro 0 (1310988) updating calibration, [-0.0009, 0.0226, 0.0011] -> [0.0000, 0.0002, -0.0001] 11.8°C
INFO [gyro_calibration] gyro 1 (1310996) updating calibration, [-0.0009, 0.0231, 0.0012] -> [0.0000, 0.0002, -0.0001] 11.8°C
INFO [gyro_calibration] gyro 2 (1311004) updating calibration, [-0.0009, 0.0231, 0.0012] -> [0.0000, 0.0002, -0.0001] 11.8°C
INFO [ekf2] 1 - resetting IMU bias
INFO [ekf2] 2 - resetting IMU bias
INFO [ekf2] 0 - resetting IMU bias
INFO [ekf2] 4 - resetting IMU bias
INFO [ekf2] 5 - resetting IMU bias
INFO [ekf2] 3 - resetting IMU bias
[ INFO] [1639074659.968311303, 16.170000000]: GF: mission received
[ INFO] [1639074659.969410314, 16.172000000]: RP: mission received
[ INFO] [1639074659.969475302, 16.172000000]: WP: mission received
[ INFO] [1639074664.988477632, 21.172000000]: HP: requesting home position
What is your commit version of PX4-Autopilot version? Here is mine:
git log
commit 2e8918da66af37922ededee1cc2d2efffec4cfb2 (HEAD, tag: v1.12.3, origin/stable, origin/beta)
Author: Daniel Agar <daniel@agar.ca>
Date: Mon Sep 6 11:52:58 2021 -0400
boards: cubepilot_cubeorange only start ADSB mavlink if console not present
- cubepilot_cubeorange_test has the console enabled (used for test rack and bench debugging)
@matlabbe Thank you for your response, yes you're are right problem seems to be with a version mismatch. So I created a new workspace as per your instruction(thanks again for adding detailed instructions in Readme), and I could run it successfully.
I'm unable to take off the drone in the given gazebo world. Although, when I tried with the default gazebo simulation, it does take off.
Drone does take off this way
Terminal1: roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557" Terminal2: roslaunch px4 posix_sitl.launch Terminal3: rosrun rtabmap_drone_example offboard
But, doesn't take off this way:
Terminal 1: roslaunch rtabmap_drone_example gazebo.launch Terminal 2: rosrun rtabmap_drone_example offboard
What could be the potential reason for this behaviour? Could it be because of the version miss-match of PX4/ mavros? I'm running this simulation on noetic.
Here is output/error of gazebo.launch(terminal1):
Below are my log
Log(Expand to see.)
# rosrun mavros checkid OK. I got messages from 1:1. --- Received 5497 messages, from 1 addresses sys:comp list of messages Exception in thread Thread-5: Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 237, in run self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration)) File "/home/rajendra/drone_ws/src/mavros/mavros/scripts/checkid", line 82, in timer_cb for address, messages in self.message_sources.iteritems(): AttributeError: 'dict' object has no attribute 'iteritems' # rostopic echo -n 1 /diagnostics header: seq: 86 stamp: secs: 87 nsecs: 500000000 frame_id: '' status: - level: 0 name: "mavros: FCU connection" message: "connected" hardware_id: "udp://:14540@localhost:14557" values: - key: "Received packets:" value: "28621" - key: "Dropped packets:" value: "0" - key: "Buffer overruns:" value: "0" - key: "Parse errors:" value: "0" - key: "Rx sequence number:" value: "205" - key: "Tx sequence number:" value: "0" - key: "Rx total bytes:" value: "1769088" - key: "Tx total bytes:" value: "101219" - key: "Rx speed:" value: "21468.000000" - key: "Tx speed:" value: "9987.000000" - level: 2 name: "mavros: GPS" message: "No satellites" hardware_id: "udp://:14540@localhost:14557" values: - key: "Satellites visible" value: "0" - key: "Fix type" value: "0" - key: "EPH (m)" value: "Unknown" - key: "EPV (m)" value: "Unknown" - level: 0 name: "mavros: Heartbeat" message: "Normal" hardware_id: "udp://:14540@localhost:14557" values: - key: "Heartbeats since startup" value: "87" - key: "Frequency (Hz)" value: "1.047619" - key: "Vehicle type" value: "Quadrotor" - key: "Autopilot type" value: "PX4 Autopilot" - key: "Mode" value: "MANUAL" - key: "System status" value: "Standby" - level: 2 name: "mavros: System" message: "Sensor health" hardware_id: "udp://:14540@localhost:14557" values: - key: "Sensor present" value: "0x1028002C" - key: "Sensor enabled" value: "0x1021000C" - key: "Sensor health" value: "0x102E000F" - key: "3D magnetometer" value: "Ok" - key: "absolute pressure" value: "Ok" - key: "rc receiver" value: "Fail" - key: "AHRS subsystem health" value: "Ok" - key: "pre-arm check status. Always healthy when armed" value: "Ok" - key: "CPU Load (%)" value: "14.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@localhost:14557" values: - key: "Voltage" value: "65.54" - key: "Current" value: "-0.0" - key: "Remaining" value: "-1.0" - level: 0 name: "mavros: Time Sync" message: "Normal" hardware_id: "udp://:14540@localhost:14557" values: - key: "Timesyncs since startup" value: "873" - key: "Frequency (Hz)" value: "10.000000" - key: "Last RTT (ms)" value: "0.000000" - key: "Mean RTT (ms)" value: "0.130584" - key: "Last remote time (s)" value: "87.396000000" - key: "Estimated time offset (s)" value: "0.004228993" # rostopic echo /mavros/state (Before running offboard) header: seq: 44 stamp: secs: 44 nsecs: 170000000 frame_id: '' connected: True armed: False guided: False manual_input: True mode: "MANUAL" system_status: 3 # rostopic echo /mavros/state (After running offboard) header: seq: 217 stamp: secs: 217 nsecs: 171000000 frame_id: '' connected: True armed: False guided: True manual_input: False mode: "AUTO.LAND" system_status: 3