-
Notifications
You must be signed in to change notification settings - Fork 4
Controlling Arm in Gazebo
To move the robot in Gazebo we need to assign a ROS controller to each joint. ROS controllers are provided by the package called ros_control. A controller is responsible for taking commands to move the joint and for publishing the joint state.
In order to actuate the robot using ROS controllers, we should define the transmission element in the URDF file to link actuators to joints. The macro used in the URDF for transmission is as follows:
Here, the joint_name is the joint to which we attach the controller. The hardwareInterface is the type of hardware interface to load (position, velocity, or effort interfaces). The hardware interface is loaded by the gazebo_ros_control plugin. The above code will specify the hardware interface type as Position Joint Interface for the joint. The following code in URDF is used to specify the hardware interface type of each revolute joint in the arm:
After specifying the hardware interface type of the joint, we need to attach a ROS controller that is compatible with the hardware interface mentioned inside the transmission tags.