机器人操作系统ROS笔记--Gazebo的使用

    Gazebo的是ROS使用的一个重要的仿真工具,环境配置与“机器人操作系统ROS笔记–从仿真开始”相同,只是采用Gazebo而不是Arbotix(Rviz)做仿真;如果需要模拟物理现象和传感器反馈,需要使用Gazebo。

    roslaunch mybot_gazebo mybot_world.launch
    roslaunch mybot_description mybot_rviz.launch

    分别打开Gazebo和Rviz,
    这里写图片描述
    仿真窗口出现小车
    这里写图片描述

    执行以下命令:

    rostopic pub /cmd_vel geometry_msgs/Twist “linear:
    x: 0.2
    y: 0.0
    z: 0.0
    angular:
    x: 0.0
    y: 0.0
    z: 0.1”

    可以观察到机器人在Gazebo和Rviz窗口中同时运动。
    这里写图片描述


    Simulating a robot’s controllers in Gazebo can be accomplished using ros_control and a simple Gazebo plugin adapter. An overview of the relationship between simulation, hardware, controllers and transmissions is shown below:
    Data flow of ros_control and Gazebo


    机器人在实际环境中运行至少需要以下模块:

    • sensors to reveal the surrounding environment
    • planning to figure out what to do
    • actuators that make the robot move

    仿真摄像头
    在myrobot包的基础上增加两个模块:

    1. mybot_description/urdf/mybot.xacro - Add the camera model
    2. mybot_description/urdf/mybot.gazebo - Add the camera plugin
    > roslaunch mybot_gazebo mybot_world.launch
    > rosrun image_view image_view image:=/mybot/camera1/image_raw
    > roslaunch mybot_description mybot_rviz.launch

    仿真激光器
    增加两个模块:
    1. mybot_description/urdf/mybot.xacro - Add the laser model
    2. mybot_description/urdf/mybot.gazebo - Add the laser plugin
    3. mybot_description/meshes/hokuyo.dae (optional) - Fancy hokuyo laser model

    在 Gazebo 和 rviz 中仿真实验。

    • 0
      点赞
    • 2
      收藏
      觉得还不错? 一键收藏
    • 打赏
      打赏
    • 1
      评论
    评论 1
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包

    打赏作者

    LiXin_SHMTU

    您的鼓励将是我创作的最大动力

    ¥1 ¥2 ¥4 ¥6 ¥10 ¥20
    扫码支付:¥1
    获取中
    扫码支付

    您的余额不足,请更换扫码支付或充值

    打赏作者

    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

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

    余额充值