Code Monkey home page Code Monkey logo

ros2_pepper's Introduction

Introduction

This project contains a set of patches and scripts to compile and run ROS 1 ROS 2 from within a Pepper robot, without the need of a tethered computer.

Pre-requirements:

Download and extract the NaoQi C++ framework and Softbanks's crosstool chain and point the AL_DIR and ALDE_CTC_CROSS environment variables to their respective paths:

export AL_DIR=/home/NaoQi  <-- Or wherever you installed NaoQi
export ALDE_CTC_CROSS=$AL_DIR/ctc-linux64-atom-2.5.2.74

Prepare cross-compiling environment

We're going to use Docker to set up a container that will compile all the tools for cross-compiling ROS and all of its dependencies. Go to https://https://www.docker.com/community-edition to download it and install it for your Linux distribution.

  1. Clone the project's repository
$ git clone git clone https://github.com/esteve/ros2_pepper.git
$ cd ros2_pepper

Prepare the requirements for ROS

The following script will create a Docker image and compile Python interpreters suitable for both the host and the robot.

./prepare_requirements_ros1.sh

Build ROS dependencies

Before we actually build ROS for Pepper, there's a bunch of dependencies we'll need to cross compile which are not available in Softbank's CTC:

  • console_bridge
  • poco
  • tinyxml2
  • urdfdom
  • urdfdom_headers
./build_ros1_dependencies.sh

Build ROS

Finally! Type the following, go grab a coffee and after a while you'll have an entire base ROS distro built for Pepper.

./build_ros1.sh

Copy ROS and their dependencies to the robot

By now you should have the following in the current directory:

  • Python 2.7 built for Pepper (Python-2.7.13-pepper) and for your host computer (Python-2.7.13-host)
  • All the dependencies required by ROS (ros1_dependencies)
  • A ROS workspace with ROS Kinetic built for Pepper (pepper_ros1_ws)
  • A helper script that will set up the ROS workspace in the robot

We're going to copy these to the robot, assuming that your robot is connected to your network, type the following:

Make sure you copy Python to the directory Python-2.7.13, without -pepper

$ scp -r .ros-root nao@IP_ADDRESS_OF_YOUR_ROBOT:.ros-root

Run ROS from within Pepper

Now that we have it all in the robot, let's give it a try:

SSH into the robot

$ ssh nao@IP_ADDRESS_OF_YOUR_ROBOT

Source (not run) the setup script

$ source .ros-root/setup_ros1_pepper.bash

Start naoqi_driver, note that NETWORK_INTERFACE may be either wlan0 or eth0, pick the appropriate interface if your robot is connected via wifi or ethernet

$ roslaunch naoqi_driver naoqi_driver.launch nao_ip:=IP_ADDRESS_OF_YOUR_ROBOT \
    roscore_ip:=IP_ADDRESS_OF_YOUR_ROBOT network_interface:=NETWORK_INTERFACE

Demos

The folks at the Universidad Rey Juan Carlos and Intelligent Robotics have produced the following video showing a Pepper robot runnning ROS onboard using the code from this repository:

Pepper Navigation

Enjoy!

ros2_pepper's People

Contributors

esteve avatar hard-fault avatar fmrico avatar

Watchers

Kamal Singh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.