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

Precision_land Mismatch for the following topics #8

Open
AlexanderSalge opened this issue Nov 6, 2024 · 2 comments
Open

Precision_land Mismatch for the following topics #8

AlexanderSalge opened this issue Nov 6, 2024 · 2 comments

Comments

@AlexanderSalge
Copy link

What issue are you running into?

~/tracktor-beam$ cd ~/tracktor-beam && source install/setup.bash && ros2 run precision_land precision_land
[INFO] [1730884591.175253510] [PrecisionLandCustom]: descent_vel: 1.000000
[INFO] [1730884591.175493038] [PrecisionLandCustom]: vel_i_gain: 0.000000
[DEBUG] [1730884591.175531263] [PrecisionLandCustom]: Waiting for FMU...
[DEBUG] [1730884594.945594329] [PrecisionLandCustom]: Checking message compatibility...
[DEBUG] [1730884594.948729642] [PrecisionLandCustom]: Subscriber found, continuing
[DEBUG] [1730884594.948822043] [PrecisionLandCustom]: Publisher found, continuing
[ERROR] [1730884596.973689162] [PrecisionLandCustom]: Mismatch for the following topics, update PX4 or the px4_ros2 library and px4_msgs:
  - fmu/in/aux_global_position
  - fmu/in/vehicle_attitude_setpoint
  - fmu/out/vehicle_global_position
terminate called after throwing an instance of 'std::runtime_error'
  what():  Registration failed
[ros2run]: Aborted

What environment are you experiencing this issue in?

wsl --version
WSL-Version: 2.3.24.0
Kernelversion: 5.15.153.1-2
WSLg-Version: 1.0.65
MSRDC-Version: 1.2.5620
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.26100.1-240331-1435.ge-release
Windows-Version: 10.0.22631.4391

Development Environment

  • PX4 Latest
  • ROS2 Humble
  • qgroundcontrol latest
  • opencv 4.10.0 (using provided installer)
  • tracktor-beam branch: aruco_tutorial

Hardware

  • Intel 10th i9
  • RTX 4080 Super
  • latest drivers and windows 23h2

Steps to reproduce

I've curated the following steps to reproduce this issue.

Startup fresh WSL instance:

wsl --install -d Ubuntu-22.04
# ETA for this code block: 10min

### add ROS2 repos and install ROS2+Gazebo ###
sudo usermod -a -G dialout $USER
sudo apt update && sudo apt list -u && sudo apt -y upgrade && sudo apt -y autoremove && sudo update-ca-certificates && sudo add-apt-repository -y universe
sudo apt install -y locales software-properties-common curl python3-pip gnupg lsb-release btop build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libv4l-dev v4l-utils qv4l2 gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl libfuse2 libxcb-xinerama0 libxkbcommon-x11-0 libxcb-cursor-dev # aptitude
# sudo aptitude install -y gazebo libgazebo11 libgazebo-dev
# sudo apt-get remove modemmanager -y
pip install -U colcon-common-extensions
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
wget -O ~/QGroundControl.AppImage https://d176tv9ibo4jno.cloudfront.net/latest/QGroundControl.AppImage
chmod +x ~/QGroundControl.AppImage
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt update && sudo apt upgrade -y && sudo apt install -y ros-humble-desktop ros-dev-tools ros-humble-ros-gzgarden ros-humble-rqt-image-view
source /opt/ros/humble/setup.bash && echo "source /opt/ros/humble/setup.bash" >> .bashrc
sudo apt update && sudo apt list -u && sudo apt -y upgrade

### setup PX4 ###
cd ~ && git clone https://github.com/PX4/PX4-Autopilot.git --recursive
bash ~/PX4-Autopilot/Tools/setup/ubuntu.sh
sudo apt update && sudo apt list -u && sudo apt -y upgrade
# ETA for this code block: 8min
# !!! Requires 1x interaction !!!
# restart Shell

cd ~/PX4-Autopilot && make px4_sitl

### setup tracktor-beam repo ###
cd ~ && git clone https://github.com/ARK-Electronics/tracktor-beam.git && cd ~/tracktor-beam && git checkout aruco_tutorial && git submodule update --init --recursive
./install_opencv.sh # enter "yes"
# wget -O install_opencv.sh https://raw.githubusercontent.com/AastaNV/JEP/refs/heads/master/script/install_opencv4.9.0_Jetpack6.sh
# ./install_opencv4.9.0_Jetpack6.sh # enter "yes"
# ETA for this code block: 14min
# will probably ask for sudo password at the end again
# restart shell

cd ~/tracktor-beam && colcon build
colcon build --packages-select aruco_tracker
source install/setup.bash

### MicroXRCEAgent ###
cd ~ && git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd ~/Micro-XRCE-DDS-Agent && mkdir build && cd build
cmake .. && make && sudo make install

Testing

Each in its own terminal

cd ~/PX4-Autopilot && make px4_sitl gz_x500_mono_cam_down_aruco
# cd ~/PX4-Autopilot && make px4_sitl gz_x500_mono_cam_down_aruco
~/Micro-XRCE-DDS-Agent/build/MicroXRCEAgent udp4 -p 8888
ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/[email protected]
ros2 run ros_gz_bridge parameter_bridge /camera_info@sensor_msgs/msg/[email protected]
~/QGroundControl.AppImage
cd ~/tracktor-beam && source install/setup.bash && ros2 run aruco_tracker aruco_tracker
cd ~/tracktor-beam && source install/setup.bash && ros2 run precision_land precision_land
ros2 run rqt_image_view rqt_image_view

Additional comments

Just starting out with PX4. Any help appreciated.

@dakejahl
Copy link
Collaborator

dakejahl commented Nov 8, 2024

Mismatch for the following topics, update PX4 or the px4_ros2 library and px4_msgs

This occurs when the PX4 messages don't match the px4_msgs. It happens all the time and I think some people are working on a better solution for this PX4/PX4-Autopilot#23850.

A quick fix is to copy/paste the messages from PX4 --> px4_msgs or vice versa. They just need to match on both sides.

@AlexanderSalge
Copy link
Author

Mismatch for the following topics, update PX4 or the px4_ros2 library and px4_msgs

This occurs when the PX4 messages don't match the px4_msgs. It happens all the time and I think some people are working on a better solution for this PX4/PX4-Autopilot#23850.

A quick fix is to copy/paste the messages from PX4 --> px4_msgs or vice versa. They just need to match on both sides.

On the same topic I think I should add, that the px4_msgs repo isn't the only submodule. I'm currently using:

cd ~/tracktor-beam/src/px4_msgs && git pull https://github.com/PX4/px4_msgs
cd ~/tracktor-beam/src/px4-ros2-interface-lib && git pull https://github.com/Auterion/px4-ros2-interface-lib
cd ~/tracktor-beam/src/vision_opencv && git pull https://github.com/ros-perception/vision_opencv

To update all tractor-beam modules before building anything

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

2 participants