Difference between revisions of "HamsterServer"

From cogniteam
Jump to: navigation, search
Line 52: Line 52:
 
<code><span style="color:brown">daria@daria:</span>~/hamster_ws$ catkin_make -j2 -DCMAKE_BUILD_TYPE=Release</code>
 
<code><span style="color:brown">daria@daria:</span>~/hamster_ws$ catkin_make -j2 -DCMAKE_BUILD_TYPE=Release</code>
  
(in case compilation mistake you may need to update ros dependencies)
+
in case compilation mistake you may need to update ros dependencies:
 +
 
 +
 
 +
<code><span style="color:brown">daria@daria:</span>~/hamster_ws$ rosdep install --from-paths src --ignore-src -y -r</code>
  
 
To .bashrc file add:
 
To .bashrc file add:

Revision as of 14:00, 27 September 2018


Few steps for hamster server install:

Single-master configuration:

https://wiki.cogni.io/index.php/HamsterROSWorkingEnvironment

Multi-master configuration

Bashrc configuration

Before all actions need to pre-configure local machine.Copy to .bashrc file:

<syntaxhighlight lang="bash"> export ROS_MASTER_URI=http://YOUR_IP:11311 export ROS_IP=YOUR_IP </syntaxhighlight>

YOUR_IP - local machine IP (ifconfig in teminal).

Should be static IP.

Run source .bashrc from terminal

Hamster workspace and launch configuration

1. Create hamster workspace:

daria@daria:~$ mkdir -p hamster_ws/src

2. Download hamster_server:

daria@daria:~$ cd hamster_ws/src

For Ubuntu 14.04 (ros indigo):

daria@daria:~/hamster_ws/src$ git clone -b master https://github.com/cogniteam/hamster_server.git

For Ubuntu 16.04 (ros kinetic):

daria@daria:~/hamster_ws/src$ git clone -b kinetic-devel https://github.com/cogniteam/hamster_server.git

3. Source workspace:

inside hamser_ws folder:

daria@daria:~/hamster_ws$ source /opt/ros/kinetic/setup.bash

daria@daria:~/hamster_ws$ catkin_make -j2 -DCMAKE_BUILD_TYPE=Release

in case compilation mistake you may need to update ros dependencies:


daria@daria:~/hamster_ws$ rosdep install --from-paths src --ignore-src -y -r

To .bashrc file add:

source ~/hamster_ws/devel/setup.bash

and execute source .bashrc from terminal

4. Launch multimaster server:

daria@daria:~/hamster_ws$ roslaunch hamster_server_launch multimaster.launch

Notes

Server launch reqiures 2 ros nodes install:

daria@daria:~$ sudo apt-get install ros-<distro>-master-discovery-fkie ros-<distro>-master-sync-fkie

<distro> - your ROS version (kinetic, indigo etc..)