0
$\begingroup$

Rosanswers logo

In ROS 2.0 tutorial : Using ament to build a custom package: Create an overlay
It says that we can use Ubuntu command which to see the path before and after we source ~/ros2_overlay_ws/install/local_setup.bash. But it just shows nothing as I typed which talker. I also tried my ros working space, it shows nothing, too. No matter I source setup.bash/local_setup.bash or not. If I type which ls, it works fine to show me /bin/ls. Although I can still run these ros package correctly, but I'm really curious to know what's wrong in my environment setting, should I set any ros environment variable to let which command works fine?


Originally posted by Josper on ROS Answers with karma: 73 on 2018-01-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I seem to find the reason, which command will search through PATH. local_setup.* and setup.* will only append ~/ros2_overlay_ws/install/bin to PATH, but demo_nodes_cpp will be put into ~/ros2_overlay_ws/install/lib folder. So they won't be found by which command.


Originally posted by Josper with karma: 73 on 2018-01-10

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.