详细问题:
关联功能包,源码编译
Failed <<< gazebo_ros2_control [11.8s, exited with code 1]
网上查了很多资料,都是比较旧版,这里注意由于ROS2系统发展很快,功能包在快速集成。
使用源码编译可能会遇到环境配置问题,如果遇到,首先到系统中直接安装对应功能包。
foxy、humble均可。
sudo apt install ros-foxy-gazebo-ros2-control
如果要直接解决这类问题,需要配置环境,较为繁琐不推荐。
--- stderr: gazebo_ros2_control
CMake Error in CMakeLists.txt:Imported target "dart" includes non-existent path"/include"in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:* The path was deleted, renamed, or moved to another location.* An install or uninstall procedure did not complete successfully.* The installation package was faulty and references files it does notprovide.CMake Error in CMakeLists.txt:Imported target "dart" includes non-existent path"/include"in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:* The path was deleted, renamed, or moved to another location.* An install or uninstall procedure did not complete successfully.* The installation package was faulty and references files it does notprovide.CMake Error in CMakeLists.txt:Imported target "dart" includes non-existent path"/include"in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:* The path was deleted, renamed, or moved to another location.* An install or uninstall procedure did not complete successfully.* The installation package was faulty and references files it does notprovide.CMake Error in CMakeLists.txt:Imported target "dart" includes non-existent path"/include"in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:* The path was deleted, renamed, or moved to another location.* An install or uninstall procedure did not complete successfully.* The installation package was faulty and references files it does notprovide.CMake Generate step failed. Build files cannot be regenerated correctly.
---
Failed <<< gazebo_ros2_control [11.8s, exited with code 1]
Aborted <<< pmb2_robot [5.74s]
Aborted <<< tiago_robot [5.62s]
Aborted <<< gripper_controllers [21.4s] Summary: 50 packages finished [38.9s]1 package failed: gazebo_ros2_control3 packages aborted: gripper_controllers pmb2_robot tiago_robot1 package had stderr output: gazebo_ros2_control3 packages not processed
chatgpt回答不知道!!!
修复重新编译:
然后就可以继续看书跑代码了。
foxy、humble均支持。
colcon build
[1.096s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:'diff_drive_controller' is in: /opt/ros/foxy'ros2_controllers' is in: /opt/ros/foxy'pmb2_bringup' is in: /opt/ros/foxy'controller_manager' is in: /opt/ros/foxy'pmb2_controller_configuration' is in: /opt/ros/foxy'joint_trajectory_controller' is in: /opt/ros/foxy'ros2_control' is in: /opt/ros/foxy'pmb2_2dnav' is in: /opt/ros/foxy'twist_mux' is in: /opt/ros/foxy'hardware_interface' is in: /opt/ros/foxy'velocity_controllers' is in: /opt/ros/foxy'pal_gazebo_worlds' is in: /opt/ros/foxy'joint_state_controller' is in: /opt/ros/foxy'launch_pal' is in: /opt/ros/foxy'effort_controllers' is in: /opt/ros/foxy'pmb2_description' is in: /opt/ros/foxy'joint_state_broadcaster' is in: /opt/ros/foxy
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.If you understand the risks and want to override a package anyways, add the following to the command line:--allow-overriding controller_manager diff_drive_controller effort_controllers hardware_interface joint_state_broadcaster joint_state_controller joint_trajectory_controller launch_pal pal_gazebo_worlds pmb2_2dnav pmb2_bringup pmb2_controller_configuration pmb2_description ros2_control ros2_controllers twist_mux velocity_controllersThis may be promoted to an error in a future release of colcon-override-check.
Starting >>> controller_manager_msgs
Starting >>> ros2_control_test_assets
Starting >>> launch_pal
Starting >>> twist_mux
Finished <<< ros2_control_test_assets [1.10s]
Starting >>> hardware_interface
Finished <<< twist_mux [1.44s]
Starting >>> hey5_description
Finished <<< hey5_description [0.64s]
Starting >>> tiago_description_calibration
Finished <<< hardware_interface [1.41s]
Starting >>> controller_interface
Finished <<< tiago_description_calibration [0.49s]
Starting >>> pal_gazebo_worlds
Finished <<< controller_manager_msgs [3.50s]
Starting >>> urdf_test
Finished <<< pal_gazebo_worlds [0.90s]
Starting >>> pmb2_maps
Finished <<< launch_pal [3.52s]
Starting >>> br2_tracking_msgs
Finished <<< controller_interface [1.06s]
Starting >>> controller_manager
Finished <<< urdf_test [0.69s]
Starting >>> pal_gripper_description
Finished <<< pmb2_maps [0.74s]
Starting >>> pmb2_2dnav
Finished <<< pmb2_2dnav [0.51s]
Starting >>> br2_basics
Finished <<< pal_gripper_description [0.73s]
Starting >>> br2_bt_bumpgo
Finished <<< controller_manager [1.96s]
Starting >>> forward_command_controller
Finished <<< br2_tracking_msgs [2.07s]
Starting >>> joint_state_broadcaster
Finished <<< br2_basics [1.24s]
Starting >>> diff_drive_controller
Finished <<< br2_bt_bumpgo [1.27s]
Starting >>> imu_sensor_broadcaster
Finished <<< forward_command_controller [1.18s]
Starting >>> joint_trajectory_controller
Finished <<< joint_state_broadcaster [1.20s]
Starting >>> joint_state_controller
Finished <<< diff_drive_controller [1.28s]
Starting >>> position_controllers
Finished <<< imu_sensor_broadcaster [1.24s]
Starting >>> force_torque_sensor_broadcaster
Finished <<< joint_state_controller [1.00s]
Starting >>> pmb2_controller_configuration
Finished <<< joint_trajectory_controller [1.35s]
Starting >>> ros2controlcli
Finished <<< position_controllers [1.53s]
Starting >>> pal_gripper_controller_configuration
Finished <<< force_torque_sensor_broadcaster [1.53s]
Starting >>> effort_controllers
Finished <<< pmb2_controller_configuration [1.28s]
Starting >>> pmb2_description
Finished <<< pal_gripper_controller_configuration [0.74s]
Starting >>> tiago_controller_configuration
Finished <<< pmb2_description [0.81s]
Starting >>> pmb2_bringup
Finished <<< effort_controllers [1.04s]
Starting >>> velocity_controllers
Finished <<< tiago_controller_configuration [0.76s]
Starting >>> tiago_description
Finished <<< pmb2_bringup [0.69s]
Starting >>> tiago_bringup
Finished <<< velocity_controllers [1.01s]
Starting >>> br2_bt_patrolling
Finished <<< tiago_description [0.98s]
Starting >>> br2_fsm_bumpgo_cpp
Finished <<< ros2controlcli [3.42s]
Starting >>> br2_fsm_bumpgo_py
Finished <<< tiago_bringup [0.98s]
Starting >>> tiago_gazebo
Finished <<< br2_fsm_bumpgo_cpp [1.30s]
Starting >>> br2_navigation
Finished <<< br2_bt_patrolling [1.73s]
Starting >>> br2_tf2_detector
Finished <<< tiago_gazebo [1.24s]
Starting >>> br2_tiago
Finished <<< br2_navigation [0.69s]
Starting >>> br2_vff_avoidance
Finished <<< br2_tiago [0.51s]
Starting >>> groot
Finished <<< br2_tf2_detector [1.01s]
Starting >>> br2_tracking
Finished <<< br2_vff_avoidance [0.90s]
Starting >>> pmb2_navigation
Finished <<< pmb2_navigation [0.64s]
Starting >>> transmission_interface
Finished <<< br2_tracking [1.16s]
Starting >>> gripper_controllers
Finished <<< br2_fsm_bumpgo_py [3.56s]
Starting >>> ros2_control
Finished <<< groot [2.15s]
Starting >>> ros2_controllers
Finished <<< ros2_control [0.58s]
Starting >>> pal_gripper
Finished <<< transmission_interface [1.00s]
Starting >>> pmb2_robot
Finished <<< gripper_controllers [1.01s]
Starting >>> tiago_robot
Finished <<< pal_gripper [0.64s]
Starting >>> tiago_2dnav_gazebo
Finished <<< ros2_controllers [0.82s]
Starting >>> tiago_simulation
Finished <<< pmb2_robot [0.75s]
Finished <<< tiago_robot [0.70s]
Finished <<< tiago_2dnav_gazebo [0.59s]
Finished <<< tiago_simulation [0.60s] Summary: 55 packages finished [17.9s]
chatgpt:
如果需要源码编译可以安装dart。
可以参考以下步骤:
1. 下载最新版本的Dart SDK;
2. 解压缩文件;
3. 运行“sudo apt-get install apt-transport-https”;
4. 添加Dart的APT存储库;5. 运行“sudo apt-get update”;
6. 运行“sudo apt-get install dart”。
ROS2支持使用Dart作为其中一种可用的调度器。
要使用Dart,
需要在ROS2的launch文件中添加一行,指定你要使用的调度器:
<launch> <arg name="scheduler" value="dart" /> </launch>