ROS2 - Autoware colcon buil Clean or similar ? clean the workspace

Hi @staff
I am following the Autoware Course Lecture 8: Object Perception: CAMERA created by the construct in youtube:
I will appreciate if you give me one hand to fix the error :slight_smile:
Do you know which cmd can I issue to clean my ws? In ROS1 I used catkin_make clean and then built again the ws from 0. Is there a kind of " colcon_build_clean" ?

I am having issues to build the perception pkg.
There are 2 pkgs dowloaded from repo: " Camera-Hands-On-Solution-WS" and " Camera-Hands-On-WS" they have the same size.

I copied one of them to my ~/adehome/AutowareAuto and issued the command colcon build --symlink-install to build it. Then unfortunately I had error msg:

$colcon build --symlink-install
`WARNING: Metapackage "lanelet2" should not have other dependencies besides a buildtool_depend on catkin and exec_depends.
/home/autoware-ros2/adehome/AutowareAuto/Camera-Hands-On-WS/src/lane_detection_projection/src/lane_detection_projection.cpp:46:5: error: expected unqualified-id before ‘{’ token
     {
     ^
make[2]: *** [CMakeFiles/lane_detection_projection_node.dir/src/lane_detection_projection.cpp.o] Error 1
make[1]: *** [CMakeFiles/lane_detection_projection_node.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< lane_detection_projection [5.91s, exited with code 2]
Aborted  <<< lane_detection_data_loader [6.21s]
Aborted  <<< motion_common [4.42s]     
Aborted  <<< lidar_integration [5.71s] 
Aborted  <<< lidar_utils [6.05s]       
Aborted  <<< ament_acado [11.0s]       
Aborted  <<< vehicle_interface [10.5s] 
Aborted  <<< joystick_vehicle_interface [12.8s]

Summary: 35 packages finished [19.9s]
  1 package failed: lane_detection_projection
  7 packages aborted: ament_acado joystick_vehicle_interface lane_detection_data_loader lidar_integration lidar_utils motion_common vehicle_interface
  3 packages had stderr output: lane_detection_data_loader lane_detection_projection vehicle_interface
  44 packages not processed`

After that I deleted this pkg and moved the other similar one (Solution one) to the folder and tried to build again…the result is that I have now more errors (I mean the system built some subfolders from the first pkg attempt = “Camera-Hans-on-WS”) then when I try to build the “Camera-Hands-on_Solution” (even with the first one removed from my ws) I get the error:

colcon build --symlink-install
WARNING: Metapackage "lanelet2" should not have other dependencies besides a buildtool_depend on catkin and exec_depends.
Starting >>> autoware_auto_cmake
Starting >>> autoware_auto_msgs
Starting >>> mrt_cmake_modules
Starting >>> mpc_warnings_cmake
Starting >>> mpark_variant_vendor
Starting >>> autoware_auto_integration_tests
Starting >>> lane_msgs
Starting >>> lexus_rx_450h_description
Finished <<< autoware_auto_cmake [0.49s]
Finished <<< mpc_warnings_cmake [0.48s]
Starting >>> autoware_auto_common
Starting >>> time_utils
Finished <<< autoware_auto_integration_tests [0.49s]
--- stderr: lane_msgs
CMake Error: The source directory "/home/autoware-ros2/adehome/AutowareAuto/Camera-Hands-On-WS/src/lane_msgs" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [cmake_check_build_system] Error 1
---
Failed   <<< lane_msgs [0.51s, exited with code 2]
Aborted  <<< time_utils [0.04s]
Aborted  <<< mpark_variant_vendor [0.52s]
Aborted  <<< mrt_cmake_modules [0.54s]
Aborted  <<< lexus_rx_450h_description [0.50s]
Aborted  <<< autoware_auto_common [0.05s]
Aborted  <<< autoware_auto_msgs [0.57s]
                                  
Summary: 3 packages finished [1.65s]
  1 package failed: lane_msgs
  6 packages aborted: autoware_auto_common autoware_auto_msgs lexus_rx_450h_description mpark_variant_vendor mrt_cmake_modules time_utils
  1 package had stderr output: lane_msgs
  77 packages not processed

Hi,

As far as I know, to clean the workspace in ros 2, you have to execute:

rm -r build install log
1 Like

Hi @duckfrost Thanks it worked!