Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
emros-ros
emros-ros
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • nathan
  • emros-rosemros-ros
  • Wiki
  • How to: Setup EMROS ROS

How to: Setup EMROS ROS

Last edited by Christian Sponfeldner Nov 21, 2018
Page history

Usage

This guide shows how to configure and start the EMROS-ROS nodes.
EMROS-ROS works together with EMROS-EM5 to connect ROS to Nanotec's mobile drive and technology platform RP-NTH (only variants with “control center”: RP-NTH-2D01-C1-xx-xx).

Requirements

  • Nantoec's RP-NTH-2D01-C1-xx-xx with CANopen Master EM5
  • 24V Power supply for RP-NTH
  • On-board computer with Linux. This How-To has been tested with Linux versions:
    -Mint 18.3 Sylvia Cinnamon
    -Ubuntu 18.04 Bionic Beaver

Preparation

  • Please follow the instructions of the following tutorials before starting with this one:
    -How to: Start running EMROS-EM5
  • Install ROS as described in the official ROS installation tutorials

Clone repro and prepare catkin workspace

  1. Create a folder for your catkin workspace (for this tutorial we call it "catkin_ws").

  2. Within catkin_ws create a folder called "src"

  3. Change directory into src, then clone the EMROS-ROS repository with parameter --recursive:

git clone --recursive https://gitlab.nanotec.de/nathan/ros-packages.git
  1. Change directory into catkin_ws. Then use catkin_make as follows:
catkin_make -j4  --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug --cmake-args -DCMAKE_CXX_COMPILER_ARG1=-std=c++11 

Catkin should create two folders in catkin_ws now: "build" and "devel"

  1. There are several setup-files in folder devel. Source the suitable one for your shell.

    For bash:

source devel/setup.bash


For zsh:

source devel/setup.zsh

The setup file need to be sourced everytime you restart the shell (e.g. after a restart of Your PC).
Hint: To permanently source the setup file, add the command to your .bashrc file or .zshrc.local.

  1. Check the Ros-path variable for Your catkin_ws:
echo $ROS_PACKAGE_PATH          

The answer should look like this:

/home/yourpath/catkin_ws/src:/opt/ros/lunar/share

Setup and start the EMROS nodes

  1. Open the file catkin_ws/src/ros-packages/emros_bringup/launch/emros_bringup.launch in a text-editor.

  2. In emros_bringup.launch edit the Parameter IP_EM5 and Port_EM5 corresponding to the settings of Your EM5. This EM5 parameter are defined in the "ethernet.ini" file in the folder "config" on the EM5 filesystem.

  3. Check the setting in main.cpp of EMROS-EM5.
    In main.cpp needs to be set the correct IP-address of Your onboard-pc (where ROS is running).
    If neccessary please recompile and flash EMROS-EM5 again into the EM5, as discribed in the tutorial How-To: Start running EMROS-EM5

  4. Start EMROS-EM5

  5. In emros_bringup.launch, leave the xml-block "2WD DIFFERENTIAL DRIVE" uncommented but comment out the "4WD MECANUM DRIVE" block (or vice versa) depending on your robot.

  6. Save the file emros_bringup.launch

  7. Start EMROS-EM5 on the RP-NTH

  8. Start the nodes:

roslaunch emros_bringup emros_bringup.launch

Hint: If You see the Error "RLException: [emros_bringup.launch] is neither a launch file in ..." You maybe forgot to source the setup.bash or setup.zsh.

  1. Two Nodes have been started:
    -Dispatcher: Sends Messages via Ethernet/UDP to EMROS-EM5 on the EM5 -Basecontroller: Accepts the robot's target velocity (topic cmd_vel), calculates the robot kinematic and tells the Dispatcher-Node what to send This can be displayed with:
rosrun rqt_graph rqt_graph 

Choose Display Nodes/Topics (all) and uncheck every checkbox in the "Hide" bar except "Debug". Selection_018_ROS_rqt_graph
The EMROS-ROS is ready to work. The Basecontroller waits now to recieve commands under the ROS-topic "/cmd_vel"

Controll the Robot with rqt_robot_steering

  1. Start the rqt_robot_steering node:
rosrun rqt_robot_steering rqt_robot_steering
  1. Set the Topic to "/cmd_vel"

  2. Enable the Button "Motor ON" at the Touchdisplay of RP-NTH's EM5.

  3. When You use sliders of rqt_robot_steering-GUI the RP-NTH should move!

Clone repository
  • How to: Setup EMROS ROS
  • emros overview
  • Home
  • how to: Use spacenav node with EMROS ROS
More Pages

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.