Coder Social home page Coder Social logo

Unable to find PX4 about px4-avoidance HOT 4 CLOSED

px4 avatar px4 commented on June 16, 2024 1
Unable to find PX4

from px4-avoidance.

Comments (4)

rajat2004 avatar rajat2004 commented on June 16, 2024 1

Sorry, my previous answer wasn't clear enough.

Before running the simulation, you need to source the setup.bash script in the catkin workspace using source ~/catkin_ws/devel/setup.bash.

This removed ~/Firmware from ROS_PACKAGE_PATH which was exported in the previous step.
Due to this, ROS was unable to find the px4.launch file located in ~/Firmware/launch

So after having sourced the setup.bash script, just export ROS_PACKAGE_PATH again using
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/Firmware .

I added the commands in the following order in my ~/.zshrc to automatically source the scripts and export the paths everytime the terminal is opened.

source ~/catkin_ws/devel/setup.zsh
source ~/Firmware/Tools/setup_gazebo.bash ~/Firmware ~/Firmware/build/posix_sitl_default
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:~/catkin_ws/src/avoidance/sim/models
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/Firmware

If you are using bash, just replace zsh with bash

from px4-avoidance.

rajat2004 avatar rajat2004 commented on June 16, 2024

Problem solved
This was caused as I was setting ROS_PACKAGE_PATH before sourcing ~/catkin_ws/devel/setup.bash which removed ~/Firmware from the path. Exporting the paths after sourcing the setup.bash file solves the problem.

from px4-avoidance.

yc718764666 avatar yc718764666 commented on June 16, 2024

Hi, I have the same question with you, could you explain it in more detail? thank you very much.

from px4-avoidance.

yc718764666 avatar yc718764666 commented on June 16, 2024

Thank you very much for your reply. I have already solved this kind of problem.

from px4-avoidance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.