hi guys. I need help understanding this code. What does it do?
00802 private void publishVelocity(double linearVelocityX, double linearVelocityY,
00803 double angularVelocityZ) {
00804 currentVelocityCommand.getLinear().setX(linearVelocityX);
00805 currentVelocityCommand.getLinear().setY(-linearVelocityY);
00806 currentVelocityCommand.getLinear().setZ(0);
00807 currentVelocityCommand.getAngular().setX(0);
00808 currentVelocityCommand.getAngular().setY(0);
00809 currentVelocityCommand.getAngular().setZ(-angularVelocityZ);
00810 }
Publish the velocity as a ROS Twist message.
Parameters:
linearVelocityX The normalized linear velocity (-1 to 1).
angularVelocityZ The normalized angular velocity (-1 to 1).
----------
currentVelocityCommand declaration:
private geometry_msgs.Twist currentVelocityCommand;
↧