Skip to content

Installation on ROBOTIS OP2

Kevin Daun edited this page Oct 1, 2015 · 4 revisions

Installation

ROS

The robot is shipped with Ubuntu 12.04 LTS, the latest ROS version supported is ROS Hydro. To install ROS Hydro and the necessary additional packages, run the following commands in a terminal on the robot

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-hydro-desktop
sudo apt-get install ros-hydro-effort-controllers ros-hydro-joint-state-controller ros-hydro-joint-state-publisher ros-hydro-turtlebot-teleop ros-hydro-controller-manager ros-hydro-imu-sensor-controller  ros-hydro-position-controllers 
sudo rosdep init
rosdep update
echo "source /opt/ros/hydro/setup.bash" >> ~/.bashrc
echo "LC_ALL="C"" >> ~/.bashrc

source ~/.bashrc
source /opt/ros/hydro/setup.bash
sudo apt-get install python-rosinstall

Afterwards, create a Catkin Workspace:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

The OP2 ROS packages require real time priority and access to the CM740 board.

  • Run the follwing commands to enable real time priority
echo "ulimit -r 31" >> ~/.bashrc
sudo su
echo "robotis hard rtprio 31" >> /etc/security/limits.conf
  • Set the the permission to access the CM740 board. Run the following line in the terminal.
sudo usermod -a -G dialout robotis 

Now, you can clone the ROBOTIS OP 2 ROS packages from Github:

cd ~/catkin_ws/src
git clone https://github.com/ROBOTIS-OP/robotis_op_common.git
git clone https://github.com/ROBOTIS-OP/robotis_op_launch.git
git clone https://github.com/ROBOTIS-OP/robotis_op_ros_control.git
git clone https://github.com/ROBOTIS-OP/robotis_op_framework.git
git clone https://github.com/ROBOTIS-OP/robotis_op_camera.git

We need to copy the CMake find script to the CMake directory .

  • Copy Finddarwin_lib.cmake from /catkin_ws/src/robotis_op_framework to /usr/share/cmake-2.8/Modules

Finally, we can build the packages.

cd ~/catkin_ws
catkin_make

If you have already setup the network you can operate the robot. Otherwise, setup the network first.

Clone this wiki locally