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
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
A few points to consider:
husky_empty_world.launchfile is found in the
husky_gazebopackage thus need to specify
find husky_gazeboor 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
- 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…