-
Notifications
You must be signed in to change notification settings - Fork 11
Tutorial For Simulating the Husky Robot
This tutorial will show you how to simulate the husky robot via ROS. Once the robot is simulated, this tutorial will show you how to configure and connect to the robot via the RC1 app.
In order to simulate the robot, you must first have a running version of Ubuntu 14.04. It is possible to use a virtual machine but it makes connecting via the app very convoluted and complicated. Second, make sure your computer is connected to the internet and has sudo apt privileges as it will be used to download and install ROS Indigo and many of the required packages.
This tutorial will show you how to download, install and navigate ROS. The version we will be using is ROS Indigo.
This tutorial will show you how to create and configure your work space. We will be using catkin to build our work space and packages.
Use the following command to download and install the husky simulator.
$ sudo apt-get install ros-indigo-husky-simulator
This tutorial will show you how to properly install and configure the uvc camera package that will allow you to simulate a camera on the husky robot by using your computer's webcam.
To run the simulator you must open the following processes in separate terminal windows:
Hint: make sure to source devel/setup.bash each time you cd in catkin_ws in a terminal window.
2.1 Set ROS_IP Environment Variable
Use ifconfig in the terminal window to find the ip address for the simulated robot. Set your ROS_IP environment variable to this ip address using:
export ROS_IP= [ip address]
2.2: Run Roscore
roscore
2.3: Run the UVC Camera package
Refer to the tutorial to see the steps needed before running the package, but once it is ready use the following command in a terminal window to launch the package:
roslaunch ./camera_node.launch
2.4: Run the Husky Simulator
You can run the Husky simulator with a multitude of worlds, but for simplicity's sake, you can use the following to launch the husky simulator with the playpen world:
roslaunch husky_gazebo husky_playpen.launch
3.1 Open the app and select the add robot option. The dialog box that appears will be used to configure our robot. The name can be set to anything. The advanced options will not be used in this case and can subsequently be ignored. The master uri box will show an address. You should replace "localhost" with the ip address you found earlier.
3.2 The robot should connect successfully and be indicated by a transition to a new screen.
Tips: If you are struggling with anything ROS related, they have a multitude of tutorials to help you.