I am getting cmake error
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".
Are you mixing ROS 1 and ROS 2?
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.
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
A work-around would be to not (auto)
source
the ROS 2 Ardentsetup.bash
file.ROS 1
catkin
should probably be fixed to not error-out with this setup, but if you don'tsource
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).
So how did you fix it?