CoppeliaRobotics / simROS2

ROS 2 Interface for CoppeliaSim
Other
32 stars 16 forks source link

Unknown CMake command "coppeliasim_add_plugin". #8

Closed alanxuefei closed 4 years ago

alanxuefei commented 4 years ago

Starting >>> sim_ros2_interface --- stderr: sim_ros2_interface
CMake Error at CMakeLists.txt:86 (coppeliasim_add_plugin): Unknown CMake command "coppeliasim_add_plugin".


Failed <<< sim_ros2_interface [3.04s, exited with code 1]

Summary: 0 packages finished [3.17s] 1 package failed: sim_ros2_interface 1 package had stderr output: sim_ros2_interface

fferri commented 4 years ago

Update libPlugin

alanxuefei commented 4 years ago

I download the latest libPlugin and replace current libPlugin.

The error becomes as below:

Starting >>> sim_ros2_interface --- stderr: sim_ros2_interface
CMake Error at /home/alan/Desktop/CoppeliaSim/programming/libPlugin/cmake/FindCoppeliaSim.cmake:206 (message): Failed reading plugin metadata (error in XML file?) Call Stack (most recent call first): CMakeLists.txt:77 (coppeliasim_generate_stubs)


Failed <<< sim_ros2_interface [8.66s, exited with code 1]

Summary: 0 packages finished [9.04s] 1 package failed: sim_ros2_interface 1 package had stderr output: sim_ros2_interface

fferri commented 4 years ago

I can't reproduce that.

Please show verbose build output, set VERBOSE=1 and MAKEFLAGS=-j1 env vars and add --event-handlers console_direct+ and --parallel-workers 1 options, e.g.:

VERBOSE=1 MAKEFLAGS=-j1 colcon build --symlink-install --event-handlers console_direct+ --parallel-workers 1

Also please post the content of sim_ros2_interface/meta/callbacks.xml

alanxuefei commented 4 years ago

The output is as below:

alan@ubuntu:~/dev_ws/src/sim_ros2_interface$ VERBOSE=1 MAKEFLAGS=-j1 colcon build --symlink-install --event-handlers console_direct+ --parallel-workers 1 Starting >>> sim_ros2_interface Re-run cmake no build system arguments -- Found ament_cmake: 0.9.7 (/home/alan/ros2_foxy/install/ament_cmake/share/ament_cmake/cmake) -- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Override CMake install command with custom implementation using symlinks instead of copying resources -- Found ament_cmake_ros: 0.9.0 (/home/alan/ros2_foxy/install/ament_cmake_ros/share/ament_cmake_ros/cmake) -- Found diagnostic_msgs: 2.0.3 (/home/alan/ros2_foxy/install/diagnostic_msgs/share/diagnostic_msgs/cmake) -- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c -- Found rosidl_adapter: 1.1.0 (/home/alan/ros2_foxy/install/rosidl_adapter/share/rosidl_adapter/cmake) -- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp -- Found geometry_msgs: 2.0.3 (/home/alan/ros2_foxy/install/geometry_msgs/share/geometry_msgs/cmake) -- Found lifecycle_msgs: 1.0.0 (/home/alan/ros2_foxy/install/lifecycle_msgs/share/lifecycle_msgs/cmake) -- Found map_msgs: 2.0.2 (/home/alan/ros2_foxy/install/map_msgs/share/map_msgs/cmake) -- Found pendulum_msgs: 0.9.3 (/home/alan/ros2_foxy/install/pendulum_msgs/share/pendulum_msgs/cmake) -- Found rosgraph_msgs: 1.0.0 (/home/alan/ros2_foxy/install/rosgraph_msgs/share/rosgraph_msgs/cmake) -- Found shape_msgs: 2.0.3 (/home/alan/ros2_foxy/install/shape_msgs/share/shape_msgs/cmake) -- Found stereo_msgs: 2.0.3 (/home/alan/ros2_foxy/install/stereo_msgs/share/stereo_msgs/cmake) -- Found tf2_geometry_msgs: 0.13.7 (/home/alan/ros2_foxy/install/tf2_geometry_msgs/share/tf2_geometry_msgs/cmake) -- Found eigen3_cmake_module: 0.1.1 (/home/alan/ros2_foxy/install/eigen3_cmake_module/share/eigen3_cmake_module/cmake) -- Found rmw_implementation_cmake: 1.0.2 (/home/alan/ros2_foxy/install/rmw_implementation_cmake/share/rmw_implementation_cmake/cmake) -- Using RMW implementation 'rmw_fastrtps_cpp' as default -- Found trajectory_msgs: 2.0.3 (/home/alan/ros2_foxy/install/trajectory_msgs/share/trajectory_msgs/cmake) -- Found visualization_msgs: 2.0.3 (/home/alan/ros2_foxy/install/visualization_msgs/share/visualization_msgs/cmake) -- Found std_srvs: 2.0.3 (/home/alan/ros2_foxy/install/std_srvs/share/std_srvs/cmake) -- Found example_interfaces: 0.9.0 (/home/alan/ros2_foxy/install/example_interfaces/share/example_interfaces/cmake) -- Found image_transport: 2.3.0 (/opt/ros/foxy/share/image_transport/cmake) -- CoppeliaSim: LIBPLUGIN_DIR: /home/alan/Desktop/CoppeliaSim/programming/libPlugin. -- CoppeliaSim: COPPELIASIM_ROOT_DIR: /home/alan/Desktop/CoppeliaSim. -- Found CoppeliaSim installation at /home/alan/Desktop/CoppeliaSim. -- Checking CoppeliaSim header version... -- CoppeliaSim headers version 4.1.0 rev1
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: regex -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Adding simStubsGen command... -- Reading plugin metadata...

error: Python package "xmlschema" not found. Please install it, e.g.: python3 -m pip install xmlschema

CMake Error at /home/alan/Desktop/CoppeliaSim/programming/libPlugin/cmake/FindCoppeliaSim.cmake:206 (message): Failed reading plugin metadata (error in XML file?) Call Stack (most recent call first): CMakeLists.txt:77 (coppeliasim_generate_stubs)

-- Configuring incomplete, errors occurred! See also "/home/alan/dev_ws/src/sim_ros2_interface/build/sim_ros2_interface/CMakeFiles/CMakeOutput.log". See also "/home/alan/dev_ws/src/sim_ros2_interface/build/sim_ros2_interface/CMakeFiles/CMakeError.log". --- stderr: sim_ros2_interface
CMake Error at /home/alan/Desktop/CoppeliaSim/programming/libPlugin/cmake/FindCoppeliaSim.cmake:206 (message): Failed reading plugin metadata (error in XML file?) Call Stack (most recent call first): CMakeLists.txt:77 (coppeliasim_generate_stubs)


Failed <<< sim_ros2_interface [6.98s, exited with code 1]

Summary: 0 packages finished [7.22s] 1 package failed: sim_ros2_interface 1 package had stderr output: sim_ros2_interface

Callbacks.xml is as below.

callbacks.zip

fferri commented 4 years ago

error: Python package "xmlschema" not found. Please install it, e.g.: python3 -m pip install xmlschema

Ditto.

alanxuefei commented 4 years ago

It works. Thanks.

fferri commented 4 years ago

Now xmlschema is optional, as it is mostly useful to plugin developers.

You can pull latest version of libPlugin and remove xmlschema.

However, leaving it installed won't hurt.

ER-ROUGUI commented 1 year ago

Update libPlugin

Hello the same probleme i got this error

Starting >>> my_robot_controller Starting >>> my_ur5_controller
Finished <<< my_ur5_controller [6.50s]
Starting >>> sim_ros2_interface Finished <<< my_robot_controller [7.39s]
--- stderr: sim_ros2_interface
CMake Error at CMakeLists.txt:55 (message): Environment variable COPPELIASIM_ROOT_DIR is not set


Failed <<< sim_ros2_interface [12.3s, exited with code 1]

Summary: 2 packages finished [22.2s] 1 package failed: sim_ros2_interface 1 package had stderr output: sim_ros2_interface

fferri commented 1 year ago

Environment variable COPPELIASIM_ROOT_DIR is not set

you have to set it via export COPPELIASIM_ROOT_DIR=/path/to/CoppeliaSim_V4_X_Y prior to building the plugin.