Complete the code to import the Twist message from the geometry_msgs package.
from geometry_msgs.msg import [1]
The Twist message is imported from geometry_msgs.msg to represent velocity commands.
Complete the code to create a Twist message instance.
velocity = [1]()You create a new Twist message by calling Twist().
Fix the error in setting the linear x velocity component.
velocity.linear.[1] = 1.0
The linear velocity in the x direction is set by linear.x.
Fill both blanks to set angular velocity around the z-axis and linear velocity along y-axis.
velocity.angular.[1] = 0.5 velocity.linear.[2] = 0.2
Angular velocity around the z-axis is set by angular.z. Linear velocity along the y-axis is set by linear.y.
Fill all three blanks to create a Twist message with linear x=1.0, linear y=0.5, and angular z=0.3.
velocity = Twist() velocity.linear.[1] = 1.0 velocity.linear.[2] = 0.5 velocity.angular.[3] = 0.3
Set linear x and y components and angular z component correctly to control forward, sideways, and rotational velocities.
