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.
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.
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!
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!