A compilation of concepts I want to remember...

Navigation
 » Home
 » About Me
 » Github

ROS+Gazebo: Husky teleop in Robocup World

06 Mar 2017 » ros

A quick post to show how to get a teleop capable husky simulation working in a robocup environment. This was presented as an exercise in the lecture material as part of the Programming for Robotics – ROS series, which is a great set of introductory material to ROS using C++. (Highly recommended)

The specific exercise asks to get the husky simulation working with teleop capabilities in the robocup14_spl_field.world.

The exercise is straight forward, with any road blocks easily resolved by searching ROS Answers.

To run, construct the below launch file first, and place the file in the launch folder of the teleop_twist_keyboard package.

<?xml version="1.0"?>
<launch>
   <arg name="world" default="robocup14_spl_field"/>
   <include file="$(find husky_gazebo)/launch/husky_empty_world.launch">
        <arg name="world_name" value="/usr/share/gazebo-2.2/worlds/$(arg world).world"/>
   </include>
   <node name="teleop" pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py" output="screen"/>
</launch>

A few points to consider:

  1. The husky_empty_world.launch file is found in the husky_gazebo package thus need to specify find husky_gazebo or specify the path explicitly.
  2. Despite indicating this was a C++ based series, the teleop_twist_keyboard is a python script thus need to set type as teleop_twist_keyboard.py.
  3. After launching, if you encounter the below output, follow these instructions to resolve. Gazebo should launch rather quickly.
Warning [gazebo.cc:215] Waited 1seconds for namespaces.
Warning [gazebo.cc:215] Waited 1seconds for namespaces.
Error [gazebo.cc:220] Waited 11 seconds for namespaces. Giving up.
Error [Node.cc:90] No namespace found
Error [Node.cc:90] No namespace found

If successful you should see Gazebo launch with the Husky robot centered in the Robocup world. After teleoping a bit, you too can send the Husky into the goal…

Husky