Missing Launch directory in learm_ros2_description
Closed this issue · 1 comments
Hi! I am trying to build the workspace with colcon build --symlink-install
, and I am getting the following error:
Finished <<< learm_ros2 [2.28s]
Starting >>> learm_ros2_description
--- stderr: learm_ros2_description
CMake Error at ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:100 (message):
ament_cmake_symlink_install_directory() can't find
'/home/mk/ros2_ws/src/learm_ros2/packages/learm_ros2_description/launch'
Call Stack (most recent call first):
ament_cmake_symlink_install/ament_cmake_symlink_install.cmake:314 (ament_cmake_symlink_install_directory)
cmake_install.cmake:41 (include)
---
Failed <<< learm_ros2_description [2.98s, exited with code 1]
Summary: 1 package finished [8.39s]
1 package failed: learm_ros2_description
2 packages had stderr output: learm_ros2 learm_ros2_description
1 package not processed
The CMakeLists tries to access the folder but it does not exist:
This is also the output of the cmakelist:
cat src/learm_ros2/packages/learm_ros2_description/CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(learm_ros2_description)
find_package(ament_cmake REQUIRED)
install(
DIRECTORY config launch meshes rviz srdf urdf
DESTINATION share/${PROJECT_NAME}
)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()
I would appreciate any other steps followed, for now:
cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
EDIT: Deleting the Launch file makes everything work (LookupError: Could not find the resource 'joint_state_publisher_gui' of type 'packages'
fixed with: sudo apt install ros-foxy-joint-state-publisher-gui
And it worked!! The robotic arm can be moved with RVIZ, but the visualisation does not show the robot at all, even with the coords shown in your picture!
But works after sudo cp -R learm_ros2_description/meshes /home/mk/ros2_ws/install/learm_ros2/share/learm_ros2/
because meshes is not found. So my guess is that everything is related to the launch directory issue!
Just to clarify the solution:
Remove "launch" from "learm_ros2_description/CMakeLists.txt"
Find&Replace "learm_ros2" with "learm_ros_description" in "learm_ros2_description/urdf/learm.urdf" and "learm_ros2_description/urdf/learm.urdf.xacro"
(the issue must've stemmed from urdf and mesh files originally living in learm_ros2 instead of learm_ros2_description)