ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How do I write a code to move Husky robot in gazebo?

asked 2016-06-13 07:14:19 -0500

Pikachu gravatar image

I am new to ROS and Gazebo. I have to move 2 robots in a square path simulataneously. To launch 2 Husky robots, I used namespace in the launch file. But I am unable to figure out on how to write a code to move these 2 robots. If not for 2 robots, it would be good if you can tell me how to move 1 Husky robot using code? I am using ROS-Indigo with Gazebo-2.2.2 version on Ubuntu 14.04.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2021-09-11 17:40:02 -0500

osilva gravatar image

Since Husky publishes to topic /cmd_vel, you can learn how is done with teleop_twist_keyboard:

sudo apt-get install ros-noetic-teleop-twist-keyboard

rosrun teleop_twist_keyboard

If you are interested in how the python file works, check the repo:

Link to code:

Hope this helps.

edit flag offensive delete link more

answered 2016-06-14 14:52:14 -0500

You may need to take this tutorial on controlling the turtlebot (simulated) first.

The concept is to Publish the "Command Velocity" Message to control the robot if the gazebo had already provided the node that running on ROS as a simulated running robot .

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-06-13 07:14:19 -0500

Seen: 1,630 times

Last updated: Sep 11 '21