qboticslabs / mastering_ros

This repository contains exercise files of the book "Mastering ROS for Robotics Programming"
https://www.packtpub.com/hardware-and-creative/mastering-ros-robotics-programming
468 stars 282 forks source link

robot don't move back. #15

Closed intijk closed 7 years ago

intijk commented 7 years ago

In this code:

https://github.com/qboticslabs/mastering_ros/blob/master/chapter_3_codes/diff_wheeled_robot_control/scripts/diff_wheeled_robot_key

moveBindings = {
        'i':(1,0),
        'o':(1,-1),
        'j':(0,1),
        'l':(0,-1),
        'u':(1,1),
        ',':(-1,0),
        '.':(-1,1),
        'm':(-1,-1),
           }

It seems you use 'k' as stop, I suggest use 'k' to make it move backwardly and you already have space for stop :)

qboticslabs commented 7 years ago

For moving back you can use ',' or comma. Space or k is used to stop. This code actually adapted from turtlebot teleop node. You can check turtlebot teleop node too.