Hamster Simulation

From Cogniteam
Jump to: navigation, search

Hamster Simulation


First check your current version of ROS by simply typing in the following command:

1 rosversion -d

ROS Installation

Installation guide for ROS Indigo can be found at the following link: http://wiki.ros.org/indigo/Installation/Ubuntu

Before cloning, Some dependencies are needed if not already installed:

1 sudo apt-get install ros-<distro>-ros-control  ros-<distro>-ros-controllers ros-<distro>-gazebo-ros ros-<distro>-gazebo-ros-control ros-<distro>-gazebo-ros-pkgs ros-<distro>-controller-manager ros-<distro>-gazebo-plugins ros-<distro>-hector-gazebo ros-<distro>-hector-gazebo-plugins ros-<distro>-ackermann-msgs ros-<distro>-costmap-2d

Next you should go ahead and create a catkin workspace:

1 source /opt/ros/<distro>/setup.bash
2 mkdir -p ~/hamster_simulation/src
3 cd ~/hamster_simulation/src
4 catkin_init_workspace

Now we can clone the Hamster simulation source code into the new workspace and make it:

1 git clone https://github.com/cogniteam/hamster_simulation.git
2 cd ~/hamster_simulation
3 catkin_make


Before continuing, source your workspace.

1 source ~/hamster_simulation/devel/setup.bash

The launch file contains hamster_multi_vehicle.launch which runs two agents You can add more agents by editing the launch file. Follow instructions in .launch file

1 roslaunch hamster_vehicle_gazebo hamster_multi_vehicle.launch

To run single robot with no-depth camera:

1 roslaunch hamster_vehicle_gazebo hamster_V6_spawner.launch

To run single robot with depth camera:

1 roslaunch hamster_vehicle_gazebo hamster_V7_spawner.launch

Also wandering function available in simulation:

To activate wandering mode:
rostopic pub /agent(PUT_YOUR_AGENT_NUMBER)/commands/wandering/enable std_msgs/Bool "data: true"
To stop wandering mode:
rostopic pub /agent(PUT_YOUR_AGENT_NUMBER)/commands/wandering/enable std_msgs/Bool "data: false"

AWS simulation

Also provided AWS wrapper with hamster_simulation:

clone simulation with wrapper:

git clone -b aws_setup https://github.com/cogniteam/hamster_simulation.git

and follow README instructions for interaction with AWS cloud