Difference between revisions of "HamsterROSWorkingEnvironment"
(Created page with "Category:HamsterROS === Hamster ROS Working Environment === == Installing and configuring ROS on a Linux desktop == ROS uses a master server node in order to connect bet...") |
|||
Line 1: | Line 1: | ||
[[Category:HamsterROS]] | [[Category:HamsterROS]] | ||
+ | {{DISPLAYTITLE:Hamster ROS Working Environment}} | ||
+ | |||
=== Hamster ROS Working Environment === | === Hamster ROS Working Environment === | ||
== Installing and configuring ROS on a Linux desktop == | == Installing and configuring ROS on a Linux desktop == |
Revision as of 12:00, 28 February 2017
Contents
Hamster ROS Working Environment
Installing and configuring ROS on a Linux desktop
ROS uses a master server node in order to connect between different ROS node programs. In order to install ROS on a Linux (Ubuntu) machine follow these links
Once ROS is installed, you will need to configure your system, follow the tutorials.
Installing and configuring Hamster software on a Linux desktop
From the terminal run the following to update required libraries sudo apt-get install ros-indigo-map-server
Download the code and compile it cd ~/ mkdir hamster_ws/src -p cd hamster_ws/src git clone https://github.com/cogniteam/hamster_server.git cd .. catkin_make source devel/setup.bash
Add the following line in ~/.bashrc source ~/hamster_ws/devel/setup.bash Running the Hamster software on the Linux desktop
Configure the server's IP to be 10.0.2.152 . Set the environmental parameters – ROS_MASTER_URI and ROS_IP, using the following commands: export ROS_MASTER_URI=http://10.0.2.152:11311 export ROS_IP=10.0.2.152
To launch the server's node, run the following command: roslaunch hamster_server_launch server.launch
This command will start rviz (as seen below on the left) and Cogniteam’s OCU (as seen below on the right). The two hamsters should start streaming information to the OCU.
Configuring Hamster Map
The Hamster robot arrives with a localization node based on amcl. This node uses a bitmap map to localize. To set the working map, go to the maps folder in the hamster_server_launch package, using: roscd hamster_server_launch/maps
Copy the map image to that folder. Also, edit the launch file to work with the new map: cd to the hamster_server_launch/launch directory, and edit server.launch . Change the field of map_server, enter the wanted yaml file path. (e.g.: $(find hamster_server_launch/maps/cogniteam.yaml) )
Configuring Hamster Location on the map
To set position for an agent, use Rviz's 2D Pose Estimation, which is located on the top bar.
Afterwards, click on the map in the desired position, drag to set heading and release when needed.
To set position for agent N, change to the appropriate topic using: Tool properties → Pose estimation → Topic : /agentN/initialpose