[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Using rosserial with Inforce MBED PAC Shield

Description: This tutorial show how to use rosserial_mbed with the Inforce 6410 plus + PAC Shield

Keywords: Inforce PAC MBED serial rosserial

Tutorial Level: BEGINNER

Using rosserial with Inforce MBED PAC Shield

Downloading the required files

Login to Inforce's website and download the BSP package: at the time this wiki was written it was: SYS6410P_Ubuntu_Linux_BSP_880411_V1.zip unzip it and place it somewhere on your home directory, e.g.:

Download an install PPA for your specific Ubuntu version form here: https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded

Generating ros_lib

Create a new empty workspace for rosserial:

Clone the rosserial repo from github and checkout to the jade-devel branch:

Move to the root of your new workspace:

and from there execute:

and then:

From that same terminal, generate the libraries that we will need later for your mbed project, e.g.:

That should create a new directory called ros_libs with all the involved libraries, on the path you wrote inside the brackets

Download and run the demo project

You can clone this demo that make use of some of the capabilities of the MBED PAC Shield for the Inforce 6410 plus board.

Clone this Github repo into your prefered directory:

You can access the instructions of this demo from its Github main page or by reading the README.md file on your downloaded ros_demo directory.

Importing your project into the custom build system

Copy your project directory into mbed-master/libraries/tests/ros/ for example:

Open the tests.py script from ~/SYS6410P/mbed-master/workspace_tools/tests.py and search for a series of braces with something similar to this:

You should make a copy of one of those and edit it with your own project's description and dependencies and place it at the end of the existing list to make things easier for the next step.

from the ~ /SYS6410P/mbed-master/workspace_tools/ directory, do:

it will answer with an error and will show you some instructions about the usage and an enumerated list with all the available projects. Your project should appear at the end of this list with a number. Example:

Execute again the script but this time as shown on the next line and replace the last number with your project's number as shown on the command from above.

It will compile the project and create a .bin file ready to be burned into the board

Downloading the code into the MBED PAC shield

Now, depending on where you are doing the work, you must copy the .bin into the stm32 flash: If you are working on a remote computer, say, a laptop. One way would be copying the file through ssh, example:

You must have correctly installed and configured SSH in your own board and use their use their corresponding user and IP.

Once the .bin is placed into your board's memory, and assuming the .bin is placed on your home directory, run this command in order to burn it into the stm32 microcontroller of the PAC board:

where:

Video of the demo running

Here's a demo video of the Inforce 6410P with rosserial_mbed in action:


2019-11-16 13:17