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

Revision history [back]

click to hide/show revision 1
initial version

TL;DR

Run catkin clean in the affected workspace

Full Explanation

I believe that I know what the problem is. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended with the filepath of the workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively creating an environment variable that didn't include the ROS distribution (which is where catkin_make lives) and therefore creating the "command not found" error.

To fix this, run catkin clean in the affected workspace, which should clear the CMAKE_PREFIX_PATH. Then built the workspace again using catkin_make, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut for pointing me in the right direction.

TL;DR

Run catkin clean in the affected workspace

Full Explanation

I believe that I know what the problem is. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended with the filepath of the workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively creating an environment variable that didn't include the ROS distribution (which is where catkin_make lives) and therefore creating the "command not found" error.

To fix this, run catkin clean in the affected workspace, which should clear the CMAKE_PREFIX_PATH. Then built build the workspace again using catkin_make, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut for pointing me in the right direction.

TL;DR

Run catkin clean in the affected workspace

Full Explanation

I believe that I know what the problem is. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended with the filepath of the by workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively creating an environment variable that didn't include the ROS distribution (which is where catkin_make lives) and therefore creating the "command not found" error.

To fix this, run catkin clean in the affected workspace, which should clear the CMAKE_PREFIX_PATH. Then build the workspace again using catkin_make, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut for pointing me in the right direction.

TL;DR

Run catkin clean in the affected workspaceworkspace to clear the devel folder. Open a new terminal without the messed up PATH, source the ROS distro, run catkin_make.

Full Explanation

I believe that I know @ahendrix's answer is correct, this is a more detailed explanation of what the problem is. went wrong and why. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended by workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively overwriting my PATH with this erroneous file path, creating an environment a PATH variable that didn't include the ROS distribution (which is where catkin_make lives) and therefore creating the "command not found" error.

To fix this, run catkin clean in the affected workspace, which should clear the CMAKE_PREFIX_PATHclears the workspace devel folder. Then build the workspace again using catkin_make, usingcatkin_make` in a new terminal, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut and @ahendrix for pointing me in the right direction.

TL;DR

Run catkin clean in the affected workspace to clear the devel folder. Open a new terminal without the messed up PATH, source the ROS distro, run catkin_make.

Full Explanation

@ahendrix's answer is correct, this is a more detailed explanation of what went wrong and why. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended by workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively overwriting my PATH with this erroneous file path, creating a PATH variable that didn't include the ROS distribution (which (i.e. included "/home/user/Qt..." instead of "/opt/ros/indigo"). catkin_make is where actually a tool provided in your ROS distribution, and not a built-in command like catkin clean or config. So when invoking catkin_make lives) and therefore creating , Ubuntu searched my PATH for the directory containing catkin_make, and because the necessary directory wasn't there, gave me the "command not found" error.

To fix this, run catkin clean in the affected workspace, which clears the workspace devel folder. Then build the workspace again usingcatkin_make` in a new terminal, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut and @ahendrix for pointing me in the right direction.

TL;DR

Run catkin clean in the affected workspace to clear the devel folder. Open a new terminal without the messed up PATH, source the ROS distro, run catkin_make.

Full Explanation

@ahendrix's answer is correct, this is a more detailed explanation of what went wrong and why. While messing with Qt, I had unintentionally changed the CMAKE_PREFIX_PATH.

As explained in the catkin workspace mechanics and catkin config docs, the CMAKE_PREFIX_PATH dictates how your workspace is chained and where catkin looks for dependencies. Somehow, I had changed CMAKE_PREFIX_PATH and then built the workspace using Qt, so that the erroneous CMAKE_PREFIX_PATH ended up as part of the workspaces' environment variables.

A workspace with the correct environment variables (use catkin config to see this) should look something like this:

Extending:          [cached] /opt/ros/indigo
Workspace:                   /home/user/repo/workspace

Where the ROS distribution has been sourced first (either using source or by editing your .bashrc file) and then extended by workspace.

Because I had (somehow) set CMAKE_PREFIX_PATH to the wrong file path, my workspace environment variables looked like this:

Extending:          [cached] /home/user/Qt/5.9.1/gcc_64
Workspace:                   /home/user/repo/workspace

Which is obviously wrong. Then, by sourcing this workspace again I was effectively overwriting my PATH with this erroneous file path, creating a PATH variable that didn't include the ROS distribution (i.e. included "/home/user/Qt..." instead of "/opt/ros/indigo"). catkin_make is actually a tool provided in your ROS distribution, and not a built-in command like catkin clean or config. So when invoking catkin_make, Ubuntu searched my PATH for the directory containing catkin_make, and because the necessary directory wasn't there, gave me the "command not found" error.

To fix this, run catkin clean in the affected workspace, which clears the workspace devel folder. folder. Then build the workspace again usingcatkin_make` using catkin_make in a new terminal, being careful to only source the ROS distribution first.

If there's anything wrong with my explanation or something I should add, please let me know. Thanks to @psammut and @ahendrix for pointing me in the right direction.