gym_gazebo2安装

gym_gazebo2安装

环境

ubuntu18, ros1-melodic & ros2-dashing, gazebo-9.19.0

安装过程

主要参考了gym_gazebo2的安装教程以及gazebo的安装教程(因为需要安装高于gazebo9.9.0的版本)还有如何安装gazebo_ros_pkgs(重点)。

Errors

1. launch_testing_ament_cmakeConfig.cmake

描述

Could not find a package configuration file provided by
"launch_testing_ament_cmake" with any of the following names:

   launch_testing_ament_cmakeConfig.cmake
   launch_testing_ament_cmake-config.cmake

 Add the installation prefix of "launch_testing_ament_cmake" to
 CMAKE_PREFIX_PATH or set "launch_testing_ament_cmake_DIR" to a directory
 containing one of the above files.  If "launch_testing_ament_cmake"
 provides a separate development package or SDK, be sure it has been
 installed.

Solution:

sudo apt install ros-dashing-launch*

Refer: link

2. gazebo_ros_pkgs

描述

--- stderr: gazebo_ros                                
In file included from /home/matthew/ros2_mara_ws/src/gazebo_ros_pkgs/gazebo_ros/src/node.cpp:15:0:
/home/matthew/ros2_mara_ws/src/gazebo_ros_pkgs/gazebo_ros/include/gazebo_ros/node.hpp:134:28: error: ‘OnSetParametersCallbackHandle’ in namespace ‘rclcpp::node_interfaces’ does not name a type
   rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr param_change_callback_handler_;
   ...

Solution:

可见是版本有问题,解决办法如下:

cd ~/ros2_mara_ws # 进入工作空间
#下面这两步相当于是git下来gazebo_ros_pkgs源码,如果因为按照github教程操作而已经存在*gazebo_ros_pkgs*包了,那么可以先把gazebo_ros_pkgs文件夹删除
wget https://raw.githubusercontent.com/ros-simulation/gazebo_ros_pkgs/ros2/gazebo_ros_pkgs.repos
vcs import src < gazebo_ros_pkgs.repos
vcs custom --args checkout dashing #这是重点,错误就是来自版本不匹配
rosdep install --from-paths src --ignore-src -r -y
colcon build --merge-install --packages-skip individual_trajectories_bridge

至此成功安装。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值