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.
A few points to consider:
- The
husky_empty_world.launch
file is found in thehusky_gazebo
package thus need to specifyfind husky_gazebo
or specify the path explicitly. - 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
. - 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…