# (VOXL2 PX4 ROS2) px4_msgs Unrecognized In Program

Source: https://forum.modalai.com/topic/4369/voxl2-px4-ros2-px4_msgs-unrecognized-in-program
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2025-04-22 18:41:47 UTC by GlennTee
Replies: 4 · Views: 830

## GlennTee · 2025-04-22 18:41:47 UTC

Hello. I'm attempting to use various PX4 messages in a program I am working on, but for some reason the px4_msgs package is not recognized at all. I'm not sure if it is a path issue or if I downloaded it wrong somehow, but I tried sourcing the files and that hasn't worked. Ignoring the type also hasn't worked for me. Is there any easy fix for this that I'm missing? I am urgently seeking a fix for this. Pictured below is the error that comes up:
![6f48655b-5981-4b3a-a80c-e609f3df10aa-image.png](https://forum.modalai.com/assets/uploads/files/1745345688791-6f48655b-5981-4b3a-a80c-e609f3df10aa-image.png)

## Reply by Zachary Lowell 0 · 2025-04-22 20:03:28 UTC

@GlennTee have you sourced the right directories? If you run `source /opt/ros/foxy/mpa_to_ros/install/setup.bash` that should tell your package manager that the px4 messages type exists. I also notice you are running this on your local machine - have you install the necessary packages there? If you instantiate the voxl-cross or qrb5165 emulator image and then use vscode inside the docker then you should be able to see the px4 messages just fine.

LMK if that helps!
Zach

## Reply by GlennTee · 2025-04-22 20:18:25 UTC (in reply to Zachary Lowell 0)

@Zachary-Lowell-0 I tried "source /opt/ros/foxy/setup.bash" and "source install/local_setup.bash," but this was for trying to run my program. I just tried running "source /opt/ros/foxy/mpa_to_ros/install/setup.bash" and this is what I got:
![30cc7677-8b26-435a-89c7-577184be2322-image.png](https://forum.modalai.com/assets/uploads/files/1745352826018-30cc7677-8b26-435a-89c7-577184be2322-image.png) 
I'm using remote ssh in order to access the files on the drone.

## Reply by Zachary Lowell 0 · 2025-04-22 20:53:49 UTC

Did you ever install voxl-ros2-foxy?

## Reply by GlennTee · 2025-04-22 20:59:22 UTC (in reply to GlennTee)

@Zachary-Lowell-0 Yes I installed voxl-ros2-foxy. This time I just tried "source /opt/ros/foxy/mpa_to_ros2/install/setup.bash" and that was accepted. However, looking now px4_msgs is still not recognized within my program.
![73d768a7-bab0-42d9-b73e-b4e84749294a-image.png](https://forum.modalai.com/assets/uploads/files/1745358768903-73d768a7-bab0-42d9-b73e-b4e84749294a-image.png)
