0
$\begingroup$

Rosanswers logo

I looked at some tutorials online, and I came across -

rostopic pub /husky/cmd_vel geometry_msgs/Twist

That does the trick well, when you specify the parameters, if I wish to keep the robot moving I believe. But I want to move it forward based on distance. Like move forward by 0.5m with 0.1 velocity and stop. What's the most direct way to do so?

I am avoiding creating a separate node for this and keeping it simple. Please let me know if more details are required.


Originally posted by nemesis on ROS Answers with karma: 237 on 2015-06-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Writing a simple node in rospy is probably the fastest way to get this done. The Husky driver itself doesn't have any position inputs, but it does publish a standard odometry topic which you can subscribe to to check an estimate of distance traveled purely based on encoders.


Originally posted by Ryan with karma: 3248 on 2015-06-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by nemesis on 2015-06-29:
Thank you. Using this reference I am trying to get this done at the moment and will update accordingly. But is there any specific reason why you didn't allow for position in

Comment by Ryan on 2015-06-30:
The skid-steer/off-road nature of the platform means that ded-reckoned turns can't be performed with any accuracy whatsoever. As well, since the majority of users wrap some kind of high-level autonomy around it, we didn't want to add a feature which would go unused at best and confuse users at worst

Comment by nemesis on 2015-07-10:
Aah okay. Thank you! And I created a node instead which basically just moves the robot forward for couple of seconds using the geometry_msgs/Twist for now. It's working properly. Will check out the odometry topic too later. Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.