Hi Support,
So I’m following the instructions in the 1. ROS2 Manipulation Moveit,
Up to the compiling section towards the bottom:
cd ~/ros2_ws/
source /opt/ros/foxy/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash
And I received these errors below:
user:~/ros2_ws$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> grasping_msgsStarting >>> my_moveit2_config
Starting >>> ur_e_description
Finished <<< my_moveit2_config [0.51s]Finished <<< ur_e_description [0.56s]
— stderr: grasping_msgs
CMake Warning (dev) at CMakeLists.txt:2 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run “cmake --help-policy CMP0048” for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
CMAKE_PROJECT_VERSION
CMAKE_PROJECT_VERSION_MAJOR
CMAKE_PROJECT_VERSION_MINOR
CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
Traceback (most recent call last):
File “/home/user/ros2_ws/build/grasping_msgs/catkin_generated/generate_cached_setup.py”, line 22, in
code = generate_environment_script(’/home/user/ros2_ws/build/grasping_msgs/devel/env.sh’)
File “/opt/ros/noetic/lib/python3/dist-packages/catkin/environment_cache.py”, line 63, in generate_environment_script
env_after = ast.literal_eval(output.decode(‘utf8’))
File “/usr/lib/python3.8/ast.py”, line 59, in literal_eval
node_or_string = parse(node_or_string, mode=‘eval’)
File “/usr/lib/python3.8/ast.py”, line 47, in parse
return compile(source, filename, mode, flags,
File “”, line 1
ROS_DISTRO was set to ‘foxy’ before. Please make sure that the environment does not mix paths from different distributions.
^
SyntaxError: invalid syntax
CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/bin/python3
“/home/user/ros2_ws/build/grasping_msgs/catkin_generated/generate_cached_setup.py”)
returned error code 1
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/all.cmake:208 (safe_execute_process)
/opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
CMakeLists.txt:4 (find_package)
Failed <<< grasping_msgs [1.36s, exited with code 1]
Summary: 2 packages finished [1.62s]
1 package failed: grasping_msgs
1 package had stderr output: grasping_msgs
And then when I tried the ros2 launch,it failed completely with the screenshot below:
Please assist in resolving this, as I’m unable to move on to ROS1 Bridge