Auterion / px4-jsbsim-bridge

JSBSim bridge for PX4 SITL/HITL simulations
BSD 3-Clause "New" or "Revised" License
26 stars 38 forks source link

RLException when calling roslaunch on jsbsim_bridge #46

Closed zimmy87 closed 3 years ago

zimmy87 commented 3 years ago

I followed the instructions for running the bridge with ROS here. The bridge package appears to build correctly but when I go to launch it with:

roslaunch jsbsim_bridge px4_jsbsim_bridge.launch

I get the following output:

RLException: [px4_jsbsim_bridge.launch] is neither a launch file in package [jsbsim_bridge] nor is [jsbsim_bridge] a launch file name
The traceback for the exception was written to the log file

Does anybody know what could be going wrong here?

Jaeyoung-Lim commented 3 years ago

@zimmy87 Have you sourced yout workspace?

source <catkin_ws>/devel/setup.bash
zimmy87 commented 3 years ago

Thanks @Jaeyoung-Lim! That solved the RLException error I'm seeing, but now when I run the roslaunch jsbsim_bridge px4_jsbsim_bridge.launch command I get the following output:

... logging to /home/v-dazi/.ros/log/c06e3c44-f8b5-11eb-950c-00155d59a2df/roslaunch-LAPTOP-726PT48T-1778.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.

Resource not found: px4
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/home/v-dazi/catkin_ws/src/px4-jsbsim-bridge
ROS path [2]=/home/v-dazi/AirSim/ros/src
ROS path [3]=/opt/ros/noetic/share
The traceback for the exception was written to the log file

The only web search result I could find mentioning the Resource not found: px4 error is here, but all the solutions mentioned in that thread were for a Gazebo-specific scenario and didn't work for me locally. Do you know what could be going on here?

Jaeyoung-Lim commented 3 years ago

@zimmy87 Great, this means that you don't have the PX4 catkin package in your path.

Where is your PX4 located? Probably the documentation is assuming that you have a working PX4 SITL setup.

For example, you need to do (http://docs.px4.io/master/en/simulation/ros_interface.html)

cd <PX4-Autopilot_clone>
DONT_RUN=1 make px4_sitl_default gazebo
source ~/catkin_ws/devel/setup.bash    # (optional)
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo
zimmy87 commented 3 years ago

I tried running the commands mentioned above, but I still get the same Resource not found: px4 error, are there any other files you can think of that might need to be source'd?

Jaeyoung-Lim commented 3 years ago

@zimmy87 Please share the whole log. If you added the path correctly, it means that px4 is not built

zimmy87 commented 3 years ago

@Jaeyoung-Lim thanks for taking a look at this, I think I figured out what I was doing wrong, I was running the commands you mentioned in a separate shell, so the ROS_PACKAGE_PATH variable wasn't available to the shell where I was running roslaunch jsbsim_bridge px4_jsbsim_bridge.launch. I ran everything in the same shell and it appears to be running just fine now.