Robot controller setup - FontysAtWork/ESA-PROJ GitHub Wiki

Robot controller OS setup

The current repository version uses ROS kinetic (Ubuntu 16.04). The Navigation stack should be compatible with ROS indigo (Ubuntu 14.04). However the vision aspect is not.

Workspace

Start by creating a catkin workspace. Then go in the src folder of the workspace, clone the repository and init all submodules:

git clone https://github.com/FontysAtWork/ESA-PROJ.git -b workspace-to-packages

After cloning the repo go into the catkin workspace. Init all submodules and run rosdep to install dependencies:

git submodule update --init --recursive
rosdep install --from-paths src --ignore-src -r -y

Unfortunately rosdep does not recognize all dependencies for some reason. Use the following command to install them:

If you use ROS Kinetic (Ubuntu 16.04 LTS)

sudo apt install ros-kinetic-teleop-twist-keyboard ros-kinetic-map-server ros-kinetic-convex-decomposition ros-kinetic-ivcon ros-kinetic-map-server ros-kinetic-laser-scan-matcher ros-kinetic-teleop-twist-joy gksu ros-kinetic-realsense-camera ros-kinetic-urg-node ros-kinetic-move-base ros-kinetic-move-base-msgs ros-kinetic-octomap* 

If you use ROS Indigo (Ubuntu 14.04 LTS)

sudo apt install ros-indigo-teleop-twist-keyboard ros-indigo-map-server ros-indigo-convex-decomposition ros-indigo-ivcon ros-indigo-map-server ros-indigo-laser-scan-matcher ros-indigo-teleop-twist-joy gksu ros-indigo-realsense-camera protobuf-compiler ros-indigo-octomap* 

To get the refbox to compile you need to run the commands (at least step 1 and 2) from this page.

The commands are:

sudo add-apt-repository ppa:timn/clips
sudo apt-get update
sudo apt-get install libmodbus-dev libclips-dev clips libclipsmm-dev protobuf-compiler libprotobuf-dev libprotoc-dev libmodbus-dev libglibmm-2.4-dev libgtkmm-3.0-dev libncurses5-dev libncursesw5-dev libyaml-cpp-dev libavahi-client-dev git libssl-dev libelf-dev mongodb-clients mongodb libzmq3-dev libyaml-dev

Now build the project with catkin_make. Note: It is possible that the catkin_make process gives an error. In that case try to re-run catkin_make.

catkin_make && source devel/setup.bash

Hokuyo LiDAR

Normally the Hokuyo sensors are mapped as ttyATM[0-9] in detected order. In order to uniquely identify them we need to add the following udev rule:

sudo echo 'KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="15d1", MODE="0666", GROUP="dialout", PROGRAM="/opt/ros/kinetic/env.sh rosrun urg_node getID %N q", SYMLINK+="sensors/hokuyo_%c"' > /etc/udev/rules.d/60-hokuyo.rules

This maps Hokuyo sensors to /dev/sensors with the name hokuyo[ID].

Eth0 without root

The youbot_driver_ros_interface creates an executable which needs raw access to the eth0 interface. This is however reserved to root users. In order to allow access without root permissions we need to add permissions to the executable. do this from the root of the catkin workspace:

sudo setcap cap_net_raw+ep devel/lib/youbot_driver_ros_interface/youbot_driver_ros_interface && 
sudo ldconfig devel/lib/youbot_driver_ros_interface/youbot_driver_ros_interface