Ask Your Question
0

ros2 equivalent of catkin_find?

asked 2018-12-14 14:33:12 -0500

kyrofa gravatar image

I'm just trying to determine if a package is present in a given workspace, and where. I was kind of surprised to not find a ros2 pkg find subcommand. Is there something similar?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-12-14 15:54:57 -0500

William gravatar image

Do you mean before you build the workspace or after it is installed and you've sourced the setup file?

In the former case you have to ask colcon with something like this:

% colcon list | grep rviz
rviz2   /Users/william/ros2_ws/src/ros2/rviz/rviz2  (ros.ament_cmake)
rviz_assimp_vendor  /Users/william/ros2_ws/src/ros2/rviz/rviz_assimp_vendor (ros.ament_cmake)
rviz_common /Users/william/ros2_ws/src/ros2/rviz/rviz_common    (ros.ament_cmake)
rviz_default_plugins    /Users/william/ros2_ws/src/ros2/rviz/rviz_default_plugins   (ros.ament_cmake)
rviz_ogre_vendor    /Users/william/ros2_ws/src/ros2/rviz/rviz_ogre_vendor   (ros.ament_cmake)
rviz_rendering  /Users/william/ros2_ws/src/ros2/rviz/rviz_rendering (ros.ament_cmake)
rviz_rendering_tests    /Users/william/ros2_ws/src/ros2/rviz/rviz_rendering_tests   (ros.ament_cmake)
rviz_visual_testing_framework   /Users/william/ros2_ws/src/ros2/rviz/rviz_visual_testing_framework  (ros.ament_cmake)

For the latter there is ros2 pkg ... commands, e.g.:

% ros2 pkg list | grep rmw
rmw
rmw_connext_cpp
rmw_connext_shared_cpp
rmw_fastrtps_cpp
rmw_fastrtps_dynamic_cpp
rmw_fastrtps_shared_cpp
rmw_implementation
rmw_implementation_cmake
rmw_opensplice_cpp

Or this:

% ros2 pkg prefix rclcpp
/Users/william/ros2_ws/install/rclcpp

If you're looking for something to do the grep for you, then we'd have to add a verb for that, but I think it would probably be accepted if a pr was made to that effect (after some iteration probably).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-12-14 14:33:12 -0500

Seen: 59 times

Last updated: Dec 14 '18