Keyboard commands to move PR2 robot on ROS Hydro not working
So I ran the following commands:
rosmake pr2_teleop roslaunch pr2_teleop teleop_keyboard.launch
to be able to control the PR2 robot from the keyboard. The keys below should move the robot correct? But it is not working.
Reading from keyboard Use 'WASD' to translate Use 'QE' to yaw Press 'Shift' to run
Here is what I see in the terminal:
* /rosversion
* /spawn_teleop_keyboard/run_vel
* /spawn_teleop_keyboard/walk_vel
* /spawn_teleop_keyboard/yaw_rate
* /spawn_teleop_keyboard/yaw_run_rate
NODES
/
spawn_teleop_keyboard (pr2_teleop/teleop_pr2_keyboard)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[spawn_teleop_keyboard-1]: started with pid [9425]
Reading from keyboard
---------------------------
Use 'WASD' to translate
Use 'QE' to yaw
Press 'Shift' to run
Any help would be appreciated. Thanks
It looks like it's running. Does it work if you press the WASD keys at that prompt?
That's the problem. Everything seems to be working but the robot does not move when the WASD keys are pressed.
I was looking at this tutorial:http://wiki.ros.org/pr2_simulator/Tutorials/BasicPR2Controls And it said: "(You need to keep the window in which you launch this node in focus while you drive the robot around)."
What does it mean by keep the terminal in focus?
https://en.wikipedia.org/wiki/Focus_(...
Yea I am not sure what is going on. The keyboard controls are still not working.
I would check that the teleop output topic (probably
/cmd_vel
) is connected, and that valid data is published on it.This may sound like a dumb question, but how do you check that? Certain lines of code that I run?
rostopic echo /cmd_vel
I would also check rostopic list and see if there's a topic called "/base_controller/command". If the topic name has changed, let me know and I'll go fix the code. This might not be a problem on your end.