ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Ubuntu which command find nothing

asked 2018-01-10 01:39:40 -0600

Josper gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-01-10 01:55:31 -0600

Josper gravatar image

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.

edit flag offensive delete link more

Question Tools



Asked: 2018-01-10 01:39:40 -0600

Seen: 130 times

Last updated: Jan 10 '18