rroche
June 21, 2023, 5:00pm
1
June 28, 2023
Join us
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Agenda
Community Announcement
Community Q&A
General Discussions
Community Announcement
A.1 :v1.14 Release update
Waiting on 2 issues until release candidate it out
A.2: PX4 Dev Summit CFP
Deadline within 2 weeks now! Please apply and hopefully meet you at the summit!
Community Q&A (No deep technical discussions)
Guideline for asking a Question
Specify what you are trying to achieve
Specify what environment / platform you are using
Prepare a Link or Document to help understand if possible
First, ask the question on Discord or create a Github Issue !
If you take over 5 minutes for the question, please continue in Discord or a Github Issue.
Q.1 : ROS2 and Gazebo simulation trouble
My end goal it to use NAV2 on a Jetson Nano to have a drone navigate around obstacles in a 2D plane. I need to simulate a depth camera and eventually a lidar before I put this on a real system.
I’m having a difficult time simulating PX4 with ROS2. There are plenty of tutorials on simulating with ROS2 and Gazebo, and I understand how to simulate my own sitl with PX4, but I can’t get ROS2 to play with my PX4 Gazebo simulations. I want to be able to import my own models and worlds. I know the docs…
Will talk with beniamino separately. Then discuss about NAV2.
Q.2: PX4 SITL starting location modification
Hello !
I try to integrate a heightmap of the world in Gazebo to simulate realistic collisions for my drone. However, even when exporting correctly PX4_HOME_ALT, PX4_HOME_LON and PX4_HOME_LAT, my drone does not appear at the correct wanted location. I’ve wrote my issue here with way more details.
I’m using PX4 1.13 and Everything is running in a Docker image based on ubuntu:20.04 on which we run the Tools/setup/ubuntu.sh script
If you have any clues, contacts or tips, I’d love to get them!
T…
I’m currently trying to implement a heightmap in Gazebo to have realistic collisions for my drone. However, after exporting PX4_HOME_LAT, PX4_HOME_LON and PX4_HOME_ALT corresponding to the desired position, the drone does not spawn where it should.
[Without_heightmap]
Above is the situation without the heightmap, and PX4 working correctly, the drone in in the middle of the bridge.
Below, this is what happen when the heightmap is loaded in Gazebo. The bridge is the red dot on the right. The c…
Could be the issue in Gazebo side, so need to investigate / debug further.
Q.3: Indoor flight with Optitrack using XRCE DDS bridge
Hello, this is abit late but I am trying to achieve indoor flight with an Optitrack setup using uXRCE dds bridge and ROS2. However, it seems that the optitrack data is not fusing into the ekf2 estimator.
My setup is as follows:
1.) Flash PX4 (master branch firmware) into Pixhawk 6X using QGC
2.) Change UXRCE_DDS_CFG parameter to Telem2
3.) Change EKF2_EV_CTRL parameter to use external vision for everything
4.) Run ROS2 script to publish optitrack data to /fmu/in/vehicle_visual_odometry topi…
vehicle_visual_odometry
is not getting used by EKF2.
No velocity information
Frame set to ENU
Timestamps are being set
60Hz rate
Covariance fields set to 0
Yaw is getting used, but position and height are not being used (as indicated by the estimator).
Answers
Please share the log when available!
Q.4: Using ROS2 simulation in parallel to ROS1 simulation environment
Hello ,
Can we install and run ROS2 on an ubuntu platform in parallel to an existing ROS1 Gazebo PX4_SITL installation . I mean can we switch between ROS 1 and ROS 2 in simulation
Yes that’s possible, and make sure to source the right ros version in the terminal.
Q.5: v1.14 beta - Fixed Wing showing weird errors
Message link: [v1.14 Release Candidate] - Flight testing & Flight Issues (logs) · Issue #21358 · PX4/PX4-Autopilot · GitHub
Discord thread: Discord
This issue was fixed in the release/1.14
branch, so we just need to tag the new beta / release candidate.
We need to test the PWM changes from Matthias before merging to 1.14 branch
Jakob will wait for the release candidate to be released.
RTL_TYPE
(being 0) still doesn’t allow uploading the mission in the 1.14 beta. This is a regression, so Jakob will create a new Issue report.
Q.6: Airtraffic warning trigger without hardware
Is there a way to trigger Airtraffic warnings without having the actual Hardware?
I triggered it with such idea of the structure:
# Create the ADS-B vehicle message
adsb_vehicle = AdsbVehicle(
icao_address=2, # Unique ICAO address for the virtual vehicle
latitude_deg=latitude_deg,
longitude_deg=longitude_deg,
absolute_altitude_m=100.0, # Initial altitude
heading_deg=0.0, # Initial heading
horizontal_velocity_m_s=10.0, # Initial veloc…
Can MAVSDK be used? Or something internally using PX4?
Simulating within PX4 could be convenient, like fake IMU for example.
General Discussions
D.1 :
My end goal it to use NAV2 on a Jetson Nano to have a drone navigate around obstacles in a 2D plane. I need to simulate a depth camera and eventually a lidar before I put this on a real system.
I’m having a difficult time simulating PX4 with ROS2. There are plenty of tutorials on simulating with ROS2 and Gazebo, and I understand how to simulate my own sitl with PX4, but I can’t get ROS2 to play with my PX4 Gazebo simulations. I want to be able to import my own models and worlds. I know the docs explain how to do it but I feel like I am fighting Gazebo at every turn because it usually doesn’t do what the docs say it will do.
I know about ros/gazebo bridge packages, but I can’t get gazebo set up how I want for me to be able to really use those.
I’ve been told that you can open your own instance of gazebo and then open a px4 instance and it will spawn the model in your first instance, but that didn’t work for me. The two just ran separately like the other wasn’t there.
Here’s a link to the discord discussion on it.
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
I’m new to ROS2 and PX4 and have only been working with them for about two months. These issues with simulation feel a little overwhelming. If someone would be willing to hop on a call after the Q&A call after we talk about this a little I would really appreciate it.
I’m running this using ROS2 Humble on Ubuntu 22.04. I’ve tried using both Gazebo and Gazebo Classic and ran into similar issues on both.
Thank you! I really appreciate the help!
A_W
June 27, 2023, 7:36am
3
Hello !
I try to integrate a heightmap of the world in Gazebo to simulate realistic collisions for my drone. However, even when exporting correctly PX4_HOME_ALT
, PX4_HOME_LON
and PX4_HOME_LAT
, my drone does not appear at the correct wanted location. I’ve wrote my issue here with way more details.
I’m using PX4 1.13 and Everything is running in a Docker image based on ubuntu:20.04
on which we run the Tools/setup/ubuntu.sh
script
If you have any clues, contacts or tips, I’d love to get them!
Thank you very much!
Hello, this is abit late but I am trying to achieve indoor flight with an Optitrack setup using uXRCE dds bridge and ROS2. However, it seems that the optitrack data is not fusing into the ekf2 estimator.
My setup is as follows:
1.) Flash PX4 (master branch firmware) into Pixhawk 6X using QGC
2.) Change UXRCE_DDS_CFG parameter to Telem2
3.) Change EKF2_EV_CTRL parameter to use external vision for everything
4.) Run ROS2 script to publish optitrack data to /fmu/in/vehicle_visual_odometry topic
5.) Run microros agent on the companion computer (Ubuntu 22.04 with ros2 Humble) to start the uXRCE dds agent. The uXRCE dds bridge is connected from FCU (Pixhawk 6x) to the on board computer through telem2 serial.
I can echo out the topics published by the uXRCE dds bridge and I have checked that the optitrack data is indeed being streamed in to the FCU by checking the vehicle_visual_odometry
uORB topic in the nsh. EKF2 does not seem to be using the optitrack pose because vehicle_local_position
uORB message isn’t converging with the optitrack pose… I have looked through the forums / github issues but can’t seem to figure out whats wrong. Did I miss anything out? Do let me know. Thanks!
1 Like
Hello ,
Can we install and run ROS2 on an ubuntu platform in parallel to an existing ROS1 Gazebo PX4_SITL installation . I mean can we switch between ROS 1 and ROS 2 in simulation
1 Like
Hey! I think that I could help you a bit with it.
1 Like
Is there a way to trigger Airtraffic warnings without having the actual Hardware?
I triggered it with such idea of the structure:
# Create the ADS-B vehicle message
adsb_vehicle = AdsbVehicle(
icao_address=2, # Unique ICAO address for the virtual vehicle
latitude_deg=latitude_deg,
longitude_deg=longitude_deg,
absolute_altitude_m=100.0, # Initial altitude
heading_deg=0.0, # Initial heading
horizontal_velocity_m_s=10.0, # Initial velocity (north direction)
vertical_velocity_m_s=0.0, # Initial vertical velocity
callsign="Virtual Traffic", # Callsign for the virtual vehicle
emitter_type=AdsbEmitterType.LARGE, # ADS-B emitter type
squawk=1000, # Squawk code
tslc_s=0 # Time since last communication in seconds
)
1 Like
Just a note, this seems to be the same issue as here:
opened 04:55PM - 21 Apr 23 UTC
vision
bug-report
## Describe the bug
I use optitrack as an external position reference, but it s… eems that ekf is not using position data.
## To Reproduce
follow the [guide](https://docs.px4.io/main/en/ros/external_position_estimation.html) and https://risc.readthedocs.io/1-indoor-flight.html
1. In Motive, choose View > Data Streaming from menu bar. Check the boxes Broadcast Frame Data in OptiTrack Streaming Engine and VRPN Streaming Engine sections. Create a rigid body by selecting markers of interest. In Advanced Network Options section change Up Axis to Z Up.
on my companion computer, run
```Console
$ roslaunch vrpn_client_ros sample.launch server:=192.168.3.252
```
I can receive Mocap data under topic `/vrpn_client_node/<rigid_body_name>/pose` by run `rostopic echo /vrpn_client_node/RigidBody/pose`
```Console
---
header:
seq: 4975
stamp:
secs: 1682086599
nsecs: 613445830
frame_id: "world"
pose:
position:
x: 1.1339868307113647
y: -2.063505172729492
z: 0.5767601728439331
orientation:
x: 0.03174411132931709
y: 0.01097777858376503
z: 0.011162354610860348
w: 0.9993734955787659
---
```
2. Remap the pose topic from Mocap /vrpn_client_node/<rigid_body_name>/pose directly to /mavros/vision_pose/pose.
```Console
$ rosrun topic_tools relay /vrpn_client_node/RigidBody/pose /mavros/vision_pose/pose
```
run `rostopic echo /mavros/vision_pose/pose` , (Not run at the same time as the command that prints `/vrpn_client_node/RigidBody/pose`.), so the update time interval is about 20ms?
```Console
---
header:
seq: 92417
stamp:
secs: 1682086448
nsecs: 761981303
frame_id: "world"
pose:
position:
x: 1.6821959018707275
y: -1.878477931022644
z: 0.8759177327156067
orientation:
x: 5.24241550010629e-05
y: -0.00011159150744788349
z: -1.5280322259059176e-05
w: 1.0
---
header:
seq: 92418
stamp:
secs: 1682086448
nsecs: 782298890
frame_id: "world"
pose:
position:
x: 1.6821929216384888
y: -1.8784681558609009
z: 0.8759211897850037
orientation:
x: 5.0888331315945834e-05
y: -7.606665894854814e-05
z: -1.709804928395897e-05
w: 1.0
---
header:
seq: 92419
stamp:
secs: 1682086448
nsecs: 791980543
frame_id: "world"
pose:
position:
x: 1.6821929216384888
y: -1.8784756660461426
z: 0.8759207725524902
orientation:
x: 6.052733078831807e-05
y: -9.11090464796871e-05
z: -1.5816982568139792e-07
w: 1.0
---
```
and in the log, we can see the `vehicle_visual_odometry_0` data is
<img width="945" alt="image" src="https://user-images.githubusercontent.com/43166007/233787162-3a129b53-c169-4912-8bf1-c494f72d61a6.png">
3. run mavros
```Console
$ roslaunch mavros px4.launch
... logging to /home/parallels/.ros/log/ecea82c8-e04e-11ed-bca1-99848a3fac42/roslaunch-ubuntu-linux-20-04-desktop-200778.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://localhost:38635/
SUMMARY
========
CLEAR PARAMETERS
* /mavros/
PARAMETERS
* /mavros/camera/frame_id: base_link
* /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: PITCH_270
* /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: PITCH_270
* /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: PITCH_270
* /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/horizontal_fov_ratio: 1.0
* /mavros/distance_sensor/sonar_1_sub/id: 2
* /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
* /mavros/distance_sensor/sonar_1_sub/subscriber: True
* /mavros/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0
* /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_protocol: v2.0
* /mavros/fcu_url: /dev/ttyUSB0:921600
* /mavros/gcs_url: udp://@192.168.3.169
* /mavros/global_position/child_frame_id: base_link
* /mavros/global_position/frame_id: map
* /mavros/global_position/gps_uere: 1.0
* /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.0003490659 // 0...
* /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/landing_target/camera/fov_x: 2.0071286398
* /mavros/landing_target/camera/fov_y: 2.0071286398
* /mavros/landing_target/image/height: 480
* /mavros/landing_target/image/width: 640
* /mavros/landing_target/land_target_type: VISION_FIDUCIAL
* /mavros/landing_target/listen_lt: False
* /mavros/landing_target/mav_frame: LOCAL_NED
* /mavros/landing_target/target_size/x: 0.3
* /mavros/landing_target/target_size/y: 0.3
* /mavros/landing_target/tf/child_frame_id: camera_center
* /mavros/landing_target/tf/frame_id: landing_target
* /mavros/landing_target/tf/listen: False
* /mavros/landing_target/tf/rate_limit: 10.0
* /mavros/landing_target/tf/send: True
* /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/mission/use_mission_item_int: True
* /mavros/mocap/use_pose: True
* /mavros/mocap/use_tf: False
* /mavros/mount/debounce_s: 4.0
* /mavros/mount/err_threshold_deg: 10.0
* /mavros/mount/negate_measured_pitch: False
* /mavros/mount/negate_measured_roll: False
* /mavros/mount/negate_measured_yaw: False
* /mavros/odometry/fcu/odom_child_id_des: base_link
* /mavros/odometry/fcu/odom_parent_id_des: map
* /mavros/plugin_blacklist: ['safety_area', '...
* /mavros/plugin_whitelist: []
* /mavros/px4flow/frame_id: px4flow
* /mavros/px4flow/ranger_fov: 0.118682
* /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: False
* /mavros/setpoint_position/mav_frame: LOCAL_NED
* /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/setpoint_raw/thrust_scaling: 1.0
* /mavros/setpoint_velocity/mav_frame: LOCAL_NED
* /mavros/startup_px4_usb_quirk: False
* /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: odom
* /mavros/vision_pose/tf/listen: False
* /mavros/vision_pose/tf/rate_limit: 10.0
* /mavros/vision_speed/listen_twist: True
* /mavros/vision_speed/twist_cov: True
* /mavros/wheel_odometry/child_frame_id: base_link
* /mavros/wheel_odometry/count: 2
* /mavros/wheel_odometry/frame_id: odom
* /mavros/wheel_odometry/send_raw: True
* /mavros/wheel_odometry/send_twist: False
* /mavros/wheel_odometry/tf/child_frame_id: base_link
* /mavros/wheel_odometry/tf/frame_id: odom
* /mavros/wheel_odometry/tf/send: False
* /mavros/wheel_odometry/use_rpm: False
* /mavros/wheel_odometry/vel_error: 0.1
* /mavros/wheel_odometry/wheel0/radius: 0.05
* /mavros/wheel_odometry/wheel0/x: 0.0
* /mavros/wheel_odometry/wheel0/y: -0.15
* /mavros/wheel_odometry/wheel1/radius: 0.05
* /mavros/wheel_odometry/wheel1/x: 0.0
* /mavros/wheel_odometry/wheel1/y: 0.15
* /rosdistro: noetic
* /rosversion: 1.15.14
NODES
/
mavros (mavros/mavros_node)
ROS_MASTER_URI=http://localhost:11311
process[mavros-1]: started with pid [200795]
[ INFO] [1682086520.296394532]: FCU URL: /dev/ttyUSB0:921600
[ INFO] [1682086520.297794449]: serial0: device: /dev/ttyUSB0 @ 921600 bps
[ INFO] [1682086520.313562407]: GCS URL: udp://@192.168.3.169
[ INFO] [1682086520.313869555]: udp1: Bind address: 0.0.0.0:14555
[ INFO] [1682086520.313905401]: udp1: Remote address: 192.168.3.169:14550
[ INFO] [1682086520.322512592]: Plugin 3dr_radio loaded
[ INFO] [1682086520.323607639]: Plugin 3dr_radio initialized
[ INFO] [1682086520.323682642]: Plugin actuator_control loaded
[ INFO] [1682086520.325633070]: Plugin actuator_control initialized
[ INFO] [1682086520.330150500]: Plugin adsb loaded
[ INFO] [1682086520.331708547]: Plugin adsb initialized
[ INFO] [1682086520.331823394]: Plugin altitude loaded
[ INFO] [1682086520.332357142]: Plugin altitude initialized
[ INFO] [1682086520.332424580]: Plugin cam_imu_sync loaded
[ INFO] [1682086520.332712902]: Plugin cam_imu_sync initialized
[ INFO] [1682086520.332780083]: Plugin camera loaded
[ INFO] [1682086520.333060754]: Plugin camera initialized
[ INFO] [1682086520.333138637]: Plugin cellular_status loaded
[ INFO] [1682086520.334165773]: Plugin cellular_status initialized
[ INFO] [1682086520.334269746]: Plugin command loaded
[ INFO] [1682086520.337549257]: Plugin command initialized
[ INFO] [1682086520.337630793]: Plugin companion_process_status loaded
[ INFO] [1682086520.338883584]: Plugin companion_process_status initialized
[ INFO] [1682086520.338961553]: Plugin debug_value loaded
[ INFO] [1682086520.341125643]: Plugin debug_value initialized
[ INFO] [1682086520.341148037]: Plugin distance_sensor blacklisted
[ INFO] [1682086520.341230820]: Plugin esc_status loaded
[ INFO] [1682086520.342040554]: Plugin esc_status initialized
[ INFO] [1682086520.342163610]: Plugin esc_telemetry loaded
[ INFO] [1682086520.342632714]: Plugin esc_telemetry initialized
[ INFO] [1682086520.342764668]: Plugin fake_gps loaded
[ INFO] [1682086520.349407934]: Plugin fake_gps initialized
[ INFO] [1682086520.349575047]: Plugin ftp loaded
[ INFO] [1682086520.353590235]: Plugin ftp initialized
[ INFO] [1682086520.353709853]: Plugin geofence loaded
[ INFO] [1682086520.355815273]: Plugin geofence initialized
[ INFO] [1682086520.355969965]: Plugin global_position loaded
[ INFO] [1682086520.363373708]: Plugin global_position initialized
[ INFO] [1682086520.363485074]: Plugin gps_input loaded
[ INFO] [1682086520.364874030]: Plugin gps_input initialized
[ INFO] [1682086520.364960897]: Plugin gps_rtk loaded
[ INFO] [1682086520.366327847]: Plugin gps_rtk initialized
[ INFO] [1682086520.366489071]: Plugin gps_status loaded
[ INFO] [1682086520.367674724]: Plugin gps_status initialized
[ INFO] [1682086520.367764556]: Plugin guided_target loaded
[ INFO] [1682086520.369660569]: Plugin guided_target initialized
[ INFO] [1682086520.369758782]: Plugin hil loaded
[ INFO] [1682086520.375381188]: Plugin hil initialized
[ INFO] [1682086520.375497626]: Plugin home_position loaded
[ INFO] [1682086520.377134673]: Plugin home_position initialized
[ INFO] [1682086520.377312231]: Plugin imu loaded
[ INFO] [1682086520.380540680]: Plugin imu initialized
[ INFO] [1682086520.380629652]: Plugin keyboard_command loaded
[ INFO] [1682086520.382015385]: Plugin keyboard_command initialized
[ INFO] [1682086520.382147511]: Plugin landing_target loaded
[ INFO] [1682086520.389228031]: Plugin landing_target initialized
[ INFO] [1682086520.389344125]: Plugin local_position loaded
[ INFO] [1682086520.392058683]: Plugin local_position initialized
[ INFO] [1682086520.392156553]: Plugin log_transfer loaded
[ INFO] [1682086520.394344283]: Plugin log_transfer initialized
[ INFO] [1682086520.394443958]: Plugin mag_calibration_status loaded
[ INFO] [1682086520.395048454]: Plugin mag_calibration_status initialized
[ INFO] [1682086520.395138844]: Plugin manual_control loaded
[ INFO] [1682086520.396730847]: Plugin manual_control initialized
[ INFO] [1682086520.396810235]: Plugin mocap_pose_estimate loaded
[ INFO] [1682086520.398326976]: Plugin mocap_pose_estimate initialized
[ INFO] [1682086520.398407567]: Plugin mount_control loaded
[ WARN] [1682086520.400640041]: Could not retrive negate_measured_roll parameter value, using default (0)
[ WARN] [1682086520.400818803]: Could not retrive negate_measured_pitch parameter value, using default (0)
[ WARN] [1682086520.401010630]: Could not retrive negate_measured_yaw parameter value, using default (0)
[ WARN] [1682086520.401585899]: Could not retrive debounce_s parameter value, using default (4.000000)
[ WARN] [1682086520.401760405]: Could not retrive err_threshold_deg parameter value, using default (10.000000)
[ INFO] [1682086520.401812026]: Plugin mount_control initialized
[ INFO] [1682086520.401896743]: Plugin nav_controller_output loaded
[ INFO] [1682086520.402223491]: Plugin nav_controller_output initialized
[ INFO] [1682086520.402294798]: Plugin obstacle_distance loaded
[ INFO] [1682086520.403531255]: Plugin obstacle_distance initialized
[ INFO] [1682086520.403606430]: Plugin odom loaded
[ INFO] [1682086520.405627649]: Plugin odom initialized
[ INFO] [1682086520.405707810]: Plugin onboard_computer_status loaded
[ INFO] [1682086520.406724071]: Plugin onboard_computer_status initialized
[ INFO] [1682086520.406863161]: Plugin param loaded
[ INFO] [1682086520.408710260]: Plugin param initialized
[ INFO] [1682086520.408859278]: Plugin play_tune loaded
[ INFO] [1682086520.410137987]: Plugin play_tune initialized
[ INFO] [1682086520.410257605]: Plugin px4flow loaded
[ INFO] [1682086520.414057024]: Plugin px4flow initialized
[ INFO] [1682086520.414194264]: Plugin rallypoint loaded
[ INFO] [1682086520.415857574]: Plugin rallypoint initialized
[ INFO] [1682086520.415894409]: Plugin rangefinder blacklisted
[ INFO] [1682086520.416043900]: Plugin rc_io loaded
[ INFO] [1682086520.418113001]: Plugin rc_io initialized
[ INFO] [1682086520.418160023]: Plugin safety_area blacklisted
[ INFO] [1682086520.418268681]: Plugin setpoint_accel loaded
[ INFO] [1682086520.419665030]: Plugin setpoint_accel initialized
[ INFO] [1682086520.419853849]: Plugin setpoint_attitude loaded
[ INFO] [1682086520.425026622]: Plugin setpoint_attitude initialized
[ INFO] [1682086520.425162789]: Plugin setpoint_position loaded
[ INFO] [1682086520.432297337]: Plugin setpoint_position initialized
[ INFO] [1682086520.432422371]: Plugin setpoint_raw loaded
[ INFO] [1682086520.437363429]: Plugin setpoint_raw initialized
[ INFO] [1682086520.437490354]: Plugin setpoint_trajectory loaded
[ INFO] [1682086520.439999459]: Plugin setpoint_trajectory initialized
[ INFO] [1682086520.440247765]: Plugin setpoint_velocity loaded
[ INFO] [1682086520.444032699]: Plugin setpoint_velocity initialized
[ INFO] [1682086520.444457015]: Plugin sys_status loaded
[ INFO] [1682086520.451360107]: Plugin sys_status initialized
[ INFO] [1682086520.451515787]: Plugin sys_time loaded
[ INFO] [1682086520.453720065]: TM: Timesync mode: MAVLINK
[ INFO] [1682086520.453915116]: TM: Not publishing sim time
[ INFO] [1682086520.454415854]: Plugin sys_time initialized
[ INFO] [1682086520.454514369]: Plugin terrain loaded
[ INFO] [1682086520.454810771]: Plugin terrain initialized
[ INFO] [1682086520.454879929]: Plugin trajectory loaded
[ INFO] [1682086520.457155213]: Plugin trajectory initialized
[ INFO] [1682086520.457236363]: Plugin tunnel loaded
[ INFO] [1682086520.458721083]: Plugin tunnel initialized
[ INFO] [1682086520.458839713]: Plugin vfr_hud loaded
[ INFO] [1682086520.459211204]: Plugin vfr_hud initialized
[ INFO] [1682086520.459237724]: Plugin vibration blacklisted
[ INFO] [1682086520.459315091]: Plugin vision_pose_estimate loaded
[ INFO] [1682086520.462900246]: Plugin vision_pose_estimate initialized
[ INFO] [1682086520.462993301]: Plugin vision_speed_estimate loaded
[ INFO] [1682086520.464535660]: Plugin vision_speed_estimate initialized
[ INFO] [1682086520.464629575]: Plugin waypoint loaded
[ INFO] [1682086520.467631983]: Plugin waypoint initialized
[ INFO] [1682086520.467666368]: Plugin wheel_odometry blacklisted
[ INFO] [1682086520.467749581]: Plugin wind_estimation loaded
[ INFO] [1682086520.468246708]: Plugin wind_estimation initialized
[ INFO] [1682086520.468526950]: Built-in SIMD instructions: ARM NEON
[ INFO] [1682086520.468562581]: Built-in MAVLink package version: 2022.12.30
[ INFO] [1682086520.468587081]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[ INFO] [1682086520.468620994]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1682086520.468657227]: udp1: Remote address: 192.168.3.169:14550
[ INFO] [1682086520.469185259]: IMU: High resolution IMU detected!
[ INFO] [1682086520.469452348]: IMU: Attitude quaternion IMU detected!
[ INFO] [1682086520.665288795]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1682086520.676228736]: IMU: High resolution IMU detected!
[ INFO] [1682086520.676465179]: IMU: Attitude quaternion IMU detected!
[ INFO] [1682086520.893204662]: FCU: Manual control regained after 12.5s
[ INFO] [1682086520.945622551]: FCU: Data link regained
[ INFO] [1682086521.460505511]: FCU: Onboard controller regained
[ INFO] [1682086521.671006917]: GF: Using MISSION_ITEM_INT
[ INFO] [1682086521.671065845]: RP: Using MISSION_ITEM_INT
[ INFO] [1682086521.671090473]: WP: Using MISSION_ITEM_INT
[ INFO] [1682086521.671106721]: VER: 1.1: Capabilities 0x000000000000e4ef
[ INFO] [1682086521.671130618]: VER: 1.1: Flight software: 010c0300 (c6186ac04a000000)
[ INFO] [1682086521.671146866]: VER: 1.1: Middleware software: 010c0300 (c6186ac04a000000)
[ INFO] [1682086521.671157998]: VER: 1.1: OS software: 080200ff (bf660cba2af81f05)
[ INFO] [1682086521.671179274]: VER: 1.1: Board hardware: 00000032
[ INFO] [1682086521.671199174]: VER: 1.1: VID/PID: 26ac:0032
[ INFO] [1682086521.671223244]: VER: 1.1: UID: 3138511635333837
[ WARN] [1682086521.673975325]: CMD: Unexpected command 520, result 0
[ INFO] [1682086530.666204872]: HP: requesting home position
[ WARN] [1682086532.803352081]: Detected jump back in time of 1.20831s. Clearing TF buffer.
[ INFO] [1682086535.670007956]: GF: mission received
[ INFO] [1682086535.670779771]: RP: mission received
[ INFO] [1682086535.671012800]: WP: mission received
[ INFO] [1682086540.666352436]: HP: requesting home position
[ INFO] [1682086550.666470368]: HP: requesting home position
[ INFO] [1682086560.666625094]: HP: requesting home position
[ INFO] [1682086570.667340168]: HP: requesting home position
```
## Expected behavior
The state of the state estimator(EKF) should directly have a simple coordinate transformation relationship with the external visual position data.
## Log Files and Screenshots
The log is [here](https://logs.px4.io/plot_app?log=619471cd-d628-4cfa-b4a0-040d6921e6b8)
As shown by the Visual Odometry position data, I pick up the plane, go east, go back near the origin, then go north, return to the origin and put down the plane. The data released by optitrack has been set correctly. At this time, the yaw angle is close to 75 degrees, so roughly the local position data should be exchanged with the x and y axes of the Visual Odometry position data (of course, the z axis is opposite). But the log shows that this is not the case.
![bokeh_plot](https://user-images.githubusercontent.com/43166007/233691907-d61f7ce8-65ce-4dd2-bda4-c0fa3858301c.png)
![bokeh_plot (1)](https://user-images.githubusercontent.com/43166007/233691947-30213801-ae42-413d-b463-90c543e6c9b3.png)
![bokeh_plot (2)](https://user-images.githubusercontent.com/43166007/233691975-feb52f31-6c51-412c-af50-6e2d9c9fe670.png)
![bokeh_plot (3)](https://user-images.githubusercontent.com/43166007/233691997-b463d69f-5ea5-4890-86d0-01064383a7f6.png)
## Drone (please complete the following information):
- fmu-v5, v1.12.3, CUAV V5+ .
- mavros 1.15, ros noetic, ubuntu20, [vrpn_client_ros on kinetic-devel branch](https://github.com/ros-drivers/vrpn_client_ros/tree/kinetic-devel) (I couldn't find a noetic version, so that shouldn't be a problem.)
- everything is install by [guiden](https://docs.px4.io/main/en/ros/mavros_installation.html)
<img width="688" alt="image" src="https://user-images.githubusercontent.com/43166007/233692447-ae522d2c-d6c0-42db-bf4a-81d9200324d8.png">
Also may be related:
opened 03:35AM - 23 May 23 UTC
VIO
🤖 ROS 2
I've written a ROS2 node that sends VIO data to the /fmu/in/vehicle_visual_odome… try topic using the uXRCE-DDS bridge.
To test that the fusion is handled correctly I've created a stationary flight [log](https://review.px4.io/plot_app?log=ad9f86fb-c57f-4a05-9d33-bcb5775c87bb), and I noticed by reading the /fmu/out/vehicle_odometry topic (vehicle_odometry uORB message), that the estimator jumps between what is perceived by the VIO and the internal (GPS+IMU) odometry.
Here is an example of a message that is sent to PX4:
```
timestamp: 1884348743
timestamp_sample: 1884348745
pose_frame: 2
position:
- 0.3625916540622711
- 0.2121472805738449
- 0.06812606006860733
q:
- 0.9994385838508606
- -2.914839751610998e-05
- 0.03003314882516861
- -0.014851653948426247
velocity_frame: 2
velocity:
- -0.0002751341671682894
- -0.00013385475904215127
- -0.0017852116143330932
angular_velocity:
- -7.331899541895837e-05
- -1.2296965905989055e-05
- 8.007127325981855e-05
position_variance:
- 2.4092826692023728e-11
- 1.7808475180625116e-11
- 2.919307684479122e-09
orientation_variance:
- 5.31228099703851e-12
- 1.589840048889582e-13
- 5.67606378565344e-12
velocity_variance:
- 6.862764507786778e-07
- 3.4139620019857375e-09
- 2.808655779062974e-07
reset_counter: 0
quality: 0
```
I also noticed that there seems to be a Visual Odometry Latency issue, something I've noticed is a recurring issue [here](https://github.com/PX4/PX4-Autopilot/issues/21504#issuecomment-1518694539) and [here](https://github.com/PX4/PX4-Autopilot/issues/21468#issuecomment-1507419859), though I see no explanation of how to fix this timestamp issue, or even if it makes any difference.
![image](https://github.com/PX4/PX4-Autopilot/assets/19560817/bd14bd8b-8705-491e-852a-ffa722d6ec72)
Should it be unix time? I simply copied the timestamp from the advertiser [example](https://github.com/PX4/px4_ros_com/blob/main/src/examples/advertisers/debug_vect_advertiser.cpp#LL56C78-L56C78) from the px4_ros_com package:
```odometry_msg.timestamp = std::chrono::time_point_cast<std::chrono::microseconds>(std::chrono::steady_clock::now()).time_since_epoch().count();```
In the following image you can see exactly when the estimator stops fusing the yaw data of the VIO, followed by the position estimation drifting, and then suddenly snaps back:
![image](https://github.com/PX4/PX4-Autopilot/assets/19560817/bcd3e3f7-591f-4045-bda5-ac27569250b7)
I obviously don't dare to do any real flight tests with the system this unstable.
@bresch wrote [this](https://github.com/PX4/PX4-Autopilot/issues/21504#issuecomment-1547451984) response to a similar issue #21504. However, I am actually sending in the FRD MAV_FRAME, so the solution that is suggested doesn't work for me.
Any help would be greatly appreciated, thanks!