Closed christianrauch closed 10 months ago
Are you using the compilers provided by conda-forge to compile the code? Can you report the content of your environment (i.e. micromamba list
)? In theory you should not need to set LD_LIBRARY_PATH
to ensure that the loader can find librclcpp.so
. However, the location of the library you report is strange, if you environment is ros_env
you should be able to find the library at micromamba/envs/ros_env/lib/librclcpp.so
.
Are you using the compilers provided by conda-forge to compile the code?
I think no. which g++
points to /usr/bin/g++
. But you have a point there. I installed micromamba install compilers cmake pkg-config make ninja colcon-common-extensions
and this now points to the compiler in the environment.
... and this actually solved the problem :-) lddtree install/image_tools/lib/image_tools/showimage
is now showing the resolved library:
showimage => install/image_tools/lib/image_tools/showimage (interpreter => /lib64/ld-linux-x86-64.so.2)
librclcpp.so => $HOME/micromamba/envs/ros_env/lib/librclcpp.so
and I can run ros2 run image_tools cam2image
without issues. Thanks.
I the ROS repos, there is a convenient package ros-dev-tools
that will install all required build tools to build packages. It would be nice if this could be available too for robostack.
Can you report the content of your environment (i.e.
micromamba list
)?In theory you should not need to set
LD_LIBRARY_PATH
to ensure that the loader can findlibrclcpp.so
. However, the location of the library you report is strange, if you environment isros_env
you should be able to find the library atmicromamba/envs/ros_env/lib/librclcpp.so
.
You are right, the library is at micromamba/envs/ros_env/lib/librclcpp.so
. I forgot to update the index before searching for the file.
I the ROS repos, there is a convenient package
ros-dev-tools
that will install all required build tools to build packages. It would be nice if this could be available too for robostack.
That makes indeed sense (even at conda-forge levels, if colcon is removed). I find myself installing complers cmake pkg-config make ninja
everywhere, having something like build-essential can be useful.
I am trying to build a colcon workspace with the sourced/activated robostack environment. I am using a simple workspace with the
image_tools
package from thedemos
repo (https://github.com/ros2/demos/tree/rolling/image_tools). For reference, this is the package source on the currenthumble
branch: image_tools.zipAfter activating the environment via
micromamba activate ros_env
, I can build the workspace as usual viacolcon build
. I get some warnings but the build finishes successfully. After sourcing the workspace via. install/setup.bash
, I can also tab-complete the built packages, i.e.ros2 run image_tools
[tab tab] will show me the nodescam2image
andshowimage
.However, when I try to run any of the nodes, I get:
The library
librclcpp.so
is inside the environment atmicromamba/envs/robostackenv/pkgs/ros-humble-rclcpp-16.0.3-py310h7c61026_3/lib/librclcpp.so
but it is not discoverable sinceLD_LIBRARY_PATH
is only pointing toinstall/image_tools/lib
.How am I supposed to use colcon inside the robostack environment?