Closed Zi-ang-Cao closed 2 months ago
There are no errors - there is some output that looks like an error, but it is not. Your package builds successfully as far as I can tell. Regarding the Python3 issue, please see our https://robostack.github.io/FAQ.html
Solution to issue cannot be found in the documentation.
Issue
Hey Team, I have trouble with compiling a customized msg or srv on M2 Mac. Before reporting this bug, I deeply test out the current solution provided #149, but failed to resolve the problem. Hence, I am going to elaborate my trails and hoping to hear back from you. THANKS IN THE ADVANCE!
Background
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif()
THIS LINE IS IMPORTANT
set(Python3_EXECUTABLE "/Users/zi-angcao/miniconda3/envs/ros_env/bin/python")
find dependencies
find_package(ament_cmake REQUIRED)
uncomment the following section in order to fill in
further dependencies manually.
find_package( REQUIRED)
FOR CUST MSG [START]
find_package(geometry_msgs REQUIRED) find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "msg/Sphere.msg" DEPENDENCIES geometry_msgs # Add packages that above messages depend on, in this case geometry_msgs for Sphere.msg )
FOR CUST MSG [END]
if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED)
the following line skips the linter which checks for copyrights
comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
the following line skips cpplint (only works in a git repo)
comment the line when this package is in a git repo and when
a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif()
Additional python files
install(PROGRAMS src/topics/talker.py src/topics/listener.py
) ########## End ####################
ament_package()
The terminal command lines that I am using for all later trails.
Error Outputs:
set(Python3_EXECUTABLE "/Users/zi-angcao/miniconda3/envs/ros_env/bin/python")
in CMakeLists.txt. I received:set(Python3_EXECUTABLE "/Users/zi-angcao/miniconda3/envs/ros_env/bin/python")
in CMakeLists.txt. I received:Failed <<< py_example [1.74s, exited with code 1]
Summary: 0 packages finished [1.86s] 1 package failed: py_example 1 package had stderr output: py_example
Environment info