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

I am getting cmake error

asked 2019-06-03 06:19:30 -0500

prajyot gravatar image

updated 2019-06-03 06:24:15 -0500

gvdhoorn gravatar image

Straight dump of the error message:

Traceback (most recent call last):
  File "/home/ubuntu/helloworld_ws/build/catkin_generated/generate_cached_setup.py", line 22, in <module>
    code = generate_environment_script('/home/ubuntu/helloworld_ws/devel/env.sh')
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/environment_cache.py", line 62, in generate_environment_script
    env_after = ast.literal_eval(output.decode('utf8'))
  File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 1
    ROS_DISTRO was set to 'Ardent' before. Please make sure that the environment does not mix paths from different distributions.
                 ^
SyntaxError: invalid syntax
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python
  "/home/ubuntu/helloworld_ws/build/catkin_generated/generate_cached_setup.py")
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:198 (safe_execute_process)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/helloworld_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/helloworld_ws/build/CMakeFiles/CMakeError.log".
edit retag flag offensive close merge delete

Comments

Are you mixing ROS 1 and ROS 2?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-03 06:25:01 -0500 )edit

Also do you want to tell us some more about what you're trying to do. Posting us little more than an error message isn't very helpful.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-03 11:58:24 -0500 )edit

yes I first installed ROS1 with kinetic distribution and then I know about ros2 which support real time interface so also installed ROS2 with kinetic distribution. I also getting roscore problem when I run roscore command. So how do I fix it.Thanks for help

prajyot gravatar image prajyot  ( 2019-06-04 01:27:40 -0500 )edit

A work-around would be to not (auto) source the ROS 2 Ardent setup.bash file.

ROS 1 catkin should probably be fixed to not error-out with this setup, but if you don't source the ROS 2 setup file it should work as normal.

Also: why did you install Ardent? That is 4 ROS 2 releases old now (and no longer supported afaik).

gvdhoorn gravatar image gvdhoorn  ( 2019-06-04 02:36:52 -0500 )edit
1

So how did you fix it?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-04 05:53:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-04 05:38:46 -0500

prajyot gravatar image

Thanks for help. I fixed the problem.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-06-03 06:19:30 -0500

Seen: 941 times

Last updated: Jun 03 '19