Created
September 30, 2015 20:53
-
-
Save mikepurvis/ca466b1b55cce0486e6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Issue some random commands to your ROS robot, yay! | |
import rospy, random | |
from geometry_msgs.msg import Twist | |
rospy.init_node("huskytest") | |
pub = rospy.Publisher("cmd_vel", Twist, queue_size=1) | |
msg = Twist() | |
while not rospy.is_shutdown(): | |
msg.linear.x = random.random() * 1.4 - 0.7 | |
for a in range(50): | |
pub.publish(msg) | |
rospy.sleep(rospy.Duration(0.05)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment