zoukankan      html  css  js  c++  java
  • 实操 | Simulating a Fetch robot in Gazebo

    Installation

    Before installing the simulation environment, make sure your desktop is setup with a standard installation of ROS Indigo on Ubuntu 14.04. Once your APT repositories are configured, you can install the simulator:

    $ sudo apt-get update
    $ sudo apt-get install ros-indigo-fetch-gazebo-demo

    Warning

    Never run the simulator on the robot. Simulation requires that the ROS parameter use_sim_time be set to true, which will cause the robot drivers to stop working correctly. In addition, be sure to never start the simulator in a terminal that has the ROS_MASTER_URI set to your robot for the same reasons.

    Starting the Simulator

    The fetch_gazebo and fetch_gazebo_demo packages provide the Gazebo environment for Fetch. fetch_gazebo includes several launch files:

    • simulation.launch spawns a robot in an empty world.
    • playground.launch spawns a robot inside a lab-like test environment. This environment has some tables with items that may be picked up and manipulated. It also has a pre-made map which can be used to test out robot navigation and some simple demonstrations of object grasping.

    To start the simplest environment:

    $ roslaunch fetch_gazebo simulation.launch
    

    Note that all of the environments will prepare the robot by tucking the arm and giving the head an initial command.

    Note: Possibly you don't see the lidar scan as in the above picture. That is because the default set of visibility of lidar scan is false. You can manually modify it in its .xacro file.

    $ roscd fetch_gazebo
    
    $ cd robots
    
    $ gedit fetch.gazebo.xacro

    locate "laser_link" block:

    modify this line:

    <visualize>false</visualize>

    as

    <visualize>true</visualize>

    Visualizing with RVIZ

    Even though Gazebo has a graphical visualization, RVIZ is still the preferred tool for interacting with your robot.

    $ rosrun rviz rviz
    

    You can now manually set up your RVIZ visualization or re-run RVIZ with a configuration file using the command line. The default .rviz configuration file for Fetch can be loaded using:

    $ roscd fetch_navigation/config
    $ rviz -d navigation.rviz

     To start with playground.launch:

    $ roslaunch fetch_gazebo playground.launch
    

    Check it in rviz:

    Running the Mobile Manipulation Demo

    There is a fully integrated demo showing navigation, perception and MoveIt! working together on the robot in simulation. To run the demo, start Gazebo simulator with the playground:

    >$ roslaunch fetch_gazebo playground.launch
    

    Wait until the simulator is fully running and then run the demo launch file:

    >$ roslaunch fetch_gazebo_demo demo.launch
    

    This will start:

    • fetch_nav.launch - this is the navigation stack with a pre-built map of the environment.
    • move_group.launch - this is the MoveIt configuration which can plan for the movement of the arm.
    • basic_grasping_perception - this is a simple demo found in the simple_grasping package which segments objects on tables and computes grasps for them.
    • demo.py - this our specific demo which navigates the robot from the starting pose in Gazebo to the table, raises the torso, lowers the head to look at the table, and then runs perception to generate a goal for MoveIt. The arm will then grasp the cube on the table, tuck the arm and lower the torso. Once the robot is back in this tucked configuration, the navigation stack will be once again called to navigate into the room with the countertop where the robot will place the cube on the other table.

    Reference:

    Fetch Robotics: Tutorial: Gazebo Simulation

     
  • 相关阅读:
    [基础架构]PeopleSoft都有哪些进程运行在进程服务器上
    [基础架构]PeopleSoft Process Scheduler 重要文件说明
    .NET Core微服务之基于Consul实现服务治理
    .net core3.1 Filter四种注入方式和异常过滤器
    ASP.NET Core配置监听URLs的六种方式
    Asp.Net Core中JWT刷新Token解决方案
    ASP.NET Core-ActionFilter实现依赖注入(ServiceFilterAttribute 、TypeFilterAttribute) 【转】
    asp.net core 3.1配置log4net
    使用 Certbot 安装 Letsencrypt 证书
    使用新版 winsw 注册 windows 系统服务无法启动及停止问题
  • 原文地址:https://www.cnblogs.com/casperwin/p/6045514.html
Copyright © 2011-2022 走看看