ROS 筆記

ros的編程範式node

 

- ros認爲,linux平臺下,機器人的軟件由一個個小程序組成,這些小程序稱爲node,每一個小程序負責一部分功能linux

- ros實現的框架就是,小程序的併發執行+相互通訊,程序(進程)的併發由linux系統調度,相互通訊是ros重點實現的message+service模型編程

- ros中的node能夠都在同一個機器上,也能夠運行在不一樣機器上並經過以太網等底層傳輸方式。ros的通訊實現基於socket。小程序

- ros的核心除了這個通訊和併發機制外,是其生態社區,大量的工具和包可快速搭建機器人,深刻學習。併發

 

 

 

Where Next?

Description: This tutorial discusses options for getting to know more about using ROS on real or simulated robots.

Tutorial Level: BEGINNER

app

 

 

 

At this point in the beginner's tutorials you should have an understanding of the core concepts of ROS.less

Given a robot that runs ROS, you could use this understanding to list topics published and subscribed by the robot, to identify the messages consumed by these topics and then write your own nodes that process sensor data and act in the world.socket

The real attraction of ROS is not the publish/subscribe middle-ware itself but that ROS provides a standard mechanism for developers around the world to share their code. The best "feature" of ROS is its enormous community.ide

The number of packages available can be overwhelming. This tutorial attempts to give you an idea of what to explore next.

 

Launching a Simulator

Even if you have a real robot, it is good to get started using a simulator so that if something goes wrong you don't injure yourself or damage an expensive robot.

You can get started with the PR2 Simulator or the Turtlebot Simulator. Alternately, you might search for your robot and check whether it has a simulator of its own.

At this point, you might try to control the simulated robot using a 'teleop' package (e.g., turtlebot_teleop) or use your understanding of ROS to find a topic and write code that sends an appropriate message to drive your robot.

 

Exploring RViz

RViz is a powerful visualization tool that allows you to view the robot's sensors and internal state. The user guide will help you get started.

 

Understanding TF

The TF package transforms between different coordinate frames used by your robot and keeps track of these transforms over time. A good understanding of TF is essential when working with any real robot. It is worthwhile to work through the tutorials.

If you're building your own robot, you might at this point consider constructing a URDF model for your robot. If you're using a "standard" robot then one has probably already being built for you. Nevertheless, it may be worthwhile to briefly familiarize yourself with the URDF package.

 

Going Deeper

At this point, you're probably ready to start getting your robot to perform more sophisticated tasks. The following pages may help you:

    1. actionlib - The actionlib package provides a standardized interface for interfacing with preemptible tasks. This is widely used by "higher-level" packages in ROS.

    2. navigation - 2D navigation: map-building and path planning.

    3. MoveIt - To control the arms of your robot

        

------------------------------------------------------------------

Intermediate Level

More client API tutorials can be found in the relevant package (roscpprospyroslisp)

 

  1. Creating a ROS package by hand.

    This tutorial explains how to manually create a ROS package.

  2. Managing System dependencies

    This explains how to use rosdep to install system dependencies.

  3. Roslaunch tips for large projects

    This tutorial describes some tips for writing roslaunch files for large projects. The focus is on how to structure launch files so they may be reused as much as possible in different situations. We'll use the 2dnav_pr2 package as a case study.

  4. Running ROS across multiple machines

    This tutorial explains how to start a ROS system using two machines. It explains the use of ROS_MASTER_URI to configure multiple machines to use a single master.

  5. Defining Custom Messages

    This tutorial will show you how to define your own custom message data types using the ROS Message Description Language.

  6. Using a C++ class in Python

    This tutorial illustrates a way to use a C++ class with ROS messages in Python.

  7. Packaging your ROS project as a snap

    This tutorial covers how to package and deploy your ROS project as a snap.

  8. How to Write a Tutorial

    This tutorial covers useful template and macros for writing tutorials, along with example tutorials that are available for guidance on ros.org

相關文章
相關標籤/搜索