Roomblock: a Platform for Learning ROS Navigation With Roomba, Raspberry Pi and RPLIDAR(转)

What is this?

"Roomblock" is a robot platform consists of a Roomba, a Raspberry Pi 2, a laser sensor(RPLIDAR) and a mobile battery. The mounting frame can be made by 3D printers. ROS navigation system enable to make a map of rooms and use it to reach to the goal autonomously.

Who need this?

Anyone who want to learn the cutting-edge technologies of robotic navigation, mapping, and autonomous driving. This robot can be built easily and lower cost than other commercial platforms. ROS is now de facto standard software system for robotic research field. This movie shows what is possible with ROS navigation system.

Step 1: What You Need

Roomba

Roomba 500, 600, 700 and 800 series are available to build this system. You can buy one from local retailers or iRobot online store. It is worth to buy a Roomba to clean your room, of course!

Caution:Roomba 900 series are not available for this system, because they have no serial port.

Raspberry Pi

You can use Raspberry Pi 2 Model B. Raspberry Pi 3 may be available for this system, but not supported in this document.

USB WiFi dongle

Raspberry Pi 2 has no WiFi interface. You need a USB WiFi dongle for wireless connection. Our choice is this product, but this may only be available in Japanese market.

We found this product is a bit problematic with newer linux kernel. If you have trouble in using this device, please consult GitHub page.

This official product would be more convenient choice, however, we haven‘t tried with it.

RPLIDAR A2

This is a low-cost LIDAR(Laser Imaging and Ranging) sensor. It measures the distance to the object in 360 degrees around. It is a key device for robotic mapping and navigation.

USB serial cable

If you already have a USB cable for Roomba interface, you can use it. If not, we recommend to modify this USB-serial cable for creating one.

Mobile battery

Raspberry Pi and RPLIDAR are driven by a mobile battery. We choose this product, however, you can choose anything with similar size and capacity.

Local PC

You need a PC installed Ubuntu and ROS for processing ROS client and user interface. The PC needs to be on the same LAN with Raspberry Pi on the robot. You can log in the Raspberry Pi via SSH.

Joy pad (Optional)

If you have a joy pad for PC, you can use it to control the robot smoothly. But don‘t worry, if you don‘t have any joy pads, you can still use the keyboard to control the robot.

Raspberry Pi camera module (Optional)

If you have Raspberry Pi camera module, you can attach it to the system. You can use it to tele-operate the robot with first person view.

Step 2: Build a Base Frame

3D printing

The base frame is a shelf-like structure designed to be mounted on the Roomba. You can download 3D printable data (STL) from Thingiverse.

We used UP! plus2 and ABS filament, "normal" setting with 0.2mm pitch.

Assembling

  • Using adhesive to the bottom of pillars makes it easy to assemble.
  • A wide rubber band is attached for fixing the mobile battery.
  • M2.5 screws are used to fix the Raspberry Pi.
  • M3 screws are used to fix RPLIDAR to the plate.
  • Use pieces of Velcro tape to fix it on Roomba top.

Step 3: Build a USB-serial Cable (Optional)

USB-serial cable

If you don‘t have USB-serial cable for Roomba, you can build it easily with this product.

Notice that the Roomba‘s inerface is TTL (5V).

Connector

You need a mini-DIN 8 pin connector for the Roomba‘s serial interface. Actually Roomba‘s connector is mini-DIN 7 pin, however, it is much easier to buy a 8 pin than 7 pin connector.

Soldering

Solder the serial cable to the 8 pin connector. Check the connection by the attached picture, and the document of Roomba open interface specification.

Please note, it is safe to connect Vcc(Red) and RTS(Green) for avoiding the hardware flow issue.

Step 4: Setup Raspberry Pi Camera Module (Optional)

If you have Raspberry Pi camera module, you can attach it to Raspberry Pi. This is optional for learning navigation, however, it is fun to get a view from the robot eyesight.

The camera mount part is also included in frame data on Thingiverse. The camera module can be fixed with four M2 screws.

Step 5: Setup Local PC

Install Ubuntu

Install Ubuntu 16.04 desktop following the official page

Install ROS

Plase consult ROS official page. Install Kinetic desktop full packages.

Install Roomblock ROS package

You need to install roomblock package from source code. The source code of the package is on GitHub.

Please follow the instruction in README.md.

If you have any problem or question concerning the software, please make an issue on GitHub Issues so that we can track the problems efficiently. Please avoid to post them on Instructables.

Step 6: Setup Raspberry Pi

Install Ubuntu

Install Ubuntu 16.04 to the Raspberry Pi following the install guide:

Install ROS

Install ROS Kinetic following the install guide:

Install Roomblock ROS package

You need to install roomblock package from source code. The source code of the package is on GitHub.

Please follow the instruction in README.md.

If you have any problem or question concerning the software, please make an issue on GitHub Issues, so that we can track the problems efficiently. Please avoid to post them on Instructables.

Raspberry Pi camera module(Optional)

If you have a Rasberry Pi camera module, you need to install libraspberrypi-dev. Please consult README.md in Github.

Step 7: Tele-operation

Bring up the base system on Raspberry Pi

First of all, you need to bring up the sysem. On the Raspberry Pi terminal, launch the basic system as:

$ export ROS_IP=IP_ADDRESS_OF_RASPBERRY_PI
$ roslaunch roomblock_bringup roomblock.launch 

RPLIDAR start to spin, and now you can connect to the robot ROS master from your local PC.

Tele-operation from local PC

You can use a joy pad to operate the robot. If you have a joy pad of XBox, you can use this launch file. Otherwise, you may need to modify the launch file to fit your joy pad. Plase consult the ROS wiki pages for detail.

$ export ROS_MASTER_URI=http://IP_ADDRESS_OF_RASPBERRY_PI:11311<br>$ roslaunch roomblock_bringup teleop.launch

Now you can control the Roomba with joystick.

Instead, you can use a keyboard.

$ export ROS_MASTER_URI=http://IP_ADDRESS_OF_RASPBERRY_PI:11311<br>$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Please consult the ROS wiki pages for detail.

Step 8: Launch the Mapping Software

Bring up the mapping software on local PC

Bring up the mapping software to create the map around the robot.

$ export ROS_MASTER_URI=http://IP_ADDRESS_OF_RASPBERRY_PI:11311<br>$ roslaunch roomblock_mapping gmapping.launch

Now you can see Rviz(visualization software). Operate the robot around the room to create a map of the room.

You can consult the ROS wiki page for mapping system.

Step 9: Launch the Autonomous Navigation

Bring up autonomous navigation software

Now you can start autonomous navigation system on the local PC as:

$ export ROS_MASTER_URI=http://IP_ADDRESS_OF_RASPBERRY_PI:11311<br>$ roslaunch rolomblock_navigation amcl.launch

You can use Rviz to specify the goal. The robot should go to the goal autonomously.

Please consult the ROS wiki page for the autonomous system.

Have fun!

If you have general questions or problems about ROS, please consult the ROS wiki. We cannot answer to general questions on ROS.

If you have any problem or question concerning the Roomblock software, please make an issue on GitHub Issues so that we can track the problems efficiently. Please avoid to post them on Instructables.

时间: 2024-10-29 19:09:03

Roomblock: a Platform for Learning ROS Navigation With Roomba, Raspberry Pi and RPLIDAR(转)的相关文章

Installing ROS Indigo on the Raspberry Pi

Description: This instruction covers the installation of ROS Indigo on the original Raspberry Pi with Raspbian.Keywords: Raspberry Pi, Setup, IndigoContents 1 Introduction This tutorial explains how to install ROS Indigo from source on the Raspberry

分析ROS Navigation Stack的原因

机器人导航是机器人所有其他功能的基础,手上现有的机器人导航框架已经基本完善,想要再进行性能以及效果上的提高需要很大的改动,因此参考ROS Navigation Stack,进行其代码结构以及思路的阅读,帮自己理清自己项目改进思路,经过几天的分析以及阅读,已经基本明确,接下来几天准备新导航代码的编写.

(ros/navigation) navigation导航中一些重要话题的来源和去路

(ros/navigation) navigation导航中一些重要话题的来源和去路,对理解程序有很大帮助 topic1:  cmd_vel Type: geometry_msgs/Twist Publishers: * /move_base Subscribers: * none topic2:  /move_base/NavfnROS/plan Type: nav_msgs/Path Publishers: * /move_base Subscribers: * /rviz topic3: 

Raspberry PI 3B + Debian 9 aarch64 + ROS lunar

从使用Rspberry Pi之后,了解有ROS这么一个开源的机器人操作系统. 最早使用Raspberry Pi 2B +raspbian Jessie 成功用源码安装成功过ROS Indigo,而后换了RaspberryPi3以后,再次尝试就怎么也不成功. 后来闲来无事,找了找移植raspberryPi 3B debian 9 arm64的方法,成功运行起64位的系统. 由于是debian 9(stretch),ROS的支持只有 lunar,所以就使用apt-get的方式进行安装了. 详细步骤在

(ros/navigation)安装Installing

mrpt_navigation/Tutorials/Installing http://wiki.ros.org/mrpt_navigation/Tutorials/Installing Installing 描述: 安装编译此包的说明 教程级别: 初级 目录 1. Get from apt packages 2. Build from sources 从apt包中获得 *注意*:只在indigo或者更高版本下可用.老版本的ros按照下面解释的,从源中编译包. # This will insta

(ros/navigation/gmapping)导航/建地图

概述 http://wiki.ros.org/gmapping Gmapping包包含OpenSlam的Gmapping的一个ROS封装.Gmapping 的ROS节点slam_gmapping提供基于激光的SLAM(同时定位和创建地图).依靠移动机器人收集的激光和位姿数据,使用slam_gmapping可以创建2维栅格地图. 外部文档 主要是一个第三方包. 硬件需求 使用slam_gmapping,需要移动机器人提供里程计数据,并且水平安装固定激光测距仪.slam_gmapping节点试图转换

(ros/navigation/slam_gmapping) map_server地图服务器

http://wiki.ros.org/map_server 概述 map_server提供map_server ROS节点,它提供地图数据作为一个ROS服务器.也提供map_saver命令行功能,能动态生成保存到文件中的地图. 地图格式 包中通过工具操作的地图是以成堆的文件存储的.YAML文件描述地图的元数据,并命名image文件.Image文件编码占用数据. Image 格式 Image 以对应单元的颜色描述世界中每个单元的占用状态.白色单元格表示自由,黑色单元格表示占用,两种颜色之间的单元

ROS Navigation 局部避障的动态窗口法(DWA)

耳熟能详的局部避障动态窗口法(Dynamic Window Approach) 概述:机器人局比避障规划方法有很多,ROS中主要采用的是动态窗口法(和原来的论文中的dwa方法不一样).动态窗口法主要是在速度(v,w)空间中采样多组速度,并模拟机器人在这些速度下一定时间内的轨迹.在得到多组轨迹后,对这些轨迹进行评价,选取最优得轨迹所对应的速度来驱动机器人运动.该算法的图书店在于动态窗口这个名词,它的含义是依据移动机器人的加减速性能限定速度采样空间在一个可行的动态范围. 1.机器人运动模型 见本博客

Learning ROS: Getting started with roswtf (检查ROS系统,找出问题)

本文主要部分来源于ROS官网的Tutorials. roswtf是ROS的检查工具,用于检查ROS安装和运行系统. Checking your installation&Offline make sure your roscore is NOT running. $ roscd $ roswtf Trying it online $ roscore & $ roscd $ roswtf Trying it with Errors Stop the roscore to simplify t