-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Fix: ROS install space #11365
Fix: ROS install space #11365
Conversation
Just need to fix now the path for |
83db146
to
6580ecd
Compare
CI still fails. |
Yep: terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Aborted (core dumped) This is happening on the |
I think we need to clarify the desired install and run directories. What do we need to install and where?
How does this change within ROS (catkin or colcon)? |
@dagar I just explained above how this changes in catkin and colcon. |
Here's how a catkin workspace is organized: http://wiki.ros.org/catkin/workspaces. |
Yes I know, but what I'm talking about is taking a step back to make sure the basics are in place first so we stop playing issue whack-a-mole. Throwing everything into share like this just isn't right. |
I am not saying that throwing everything into share is the solution. But something has to go there eventually. |
@dagar what do you suggest to be done in order this gets solved? We need to eventually bring something under |
@dagar please let me know how do you want to proceed with this. I am ok on discussing this on a call. Thanks |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Still needs discussion. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
This needs discussion but let's close it for now. I will get back to it later. |
I'm running into the same install issue that this is designed to fix, any chance we can revisit this? |
Describe problem solved by the proposed pull request
Inside a ROS context, there are currently two distinctive ways we can build packages inside a workspace: using
catkin tools
or usingcolcon
. While the first one supports a devel space, the second one doesn't and installs the project according to the directives on theCMakeLists.txt
files.So, while using
catkin tools
, the solution would work as expected, since everything will be set and under a devel space, when using an install space, things wouldn't work properly, as we are not installing the required files onto the expected directories.Describe your preferred solution
The solution was to get into the posix platform build structure, specifically for the sitl target, and rearrange the install dirs, in a way that they match the expected organisation for a ROS workspace. While this continues to work in a normal raw CMake build, the current install dirs also allow it to work inside a ROS workspace.
Additional context
To test it, one can use and install
colcon
on his system (assuming that you have ROS installed already). If you are under a ROS 1 context:$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' $ sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116 $ sudo apt update $ sudo apt install python3-colcon-common-extensions
Then, to build PX4 under a ROS1 workspace:
$ mkdir -p colcon_ws/src $ cd colcon_ws/src $ git clone --recursive https://github.com/PX4/Firmware $ ln -s Firmware/Tools/sitl_gazebo mavlink_sitl_gazebo $ colcon build --event-handlers console_direct+
The above can also be tested using
catkin
by setting aninstall
space:catkin config --install
.Then, to test if it works, first source your workspace using
source install/local_setup.bash
(orsetup.bash
for thecatkin
case). Then, try running one of the launch files:roslaunch px4 mavros_posix_sitl.launch
. If all was properly set, the Gazebo simulation with PX4 SITL and MAVROS will launch as they should.