Robotics StackExchange | Archived questions

pr2_teleop not working with indoor simulator

I'm still new to ROS but I have gone through the hector quadrotor tutorial (http://wiki.ros.org/hector_quadrotor/Tutorials/Quadrotor%20indoor%20SLAM%20demo) and the indoor program comes up fine with no errors. Then I run:

$ rosrun pr2_telop_pr2_keyboard

And the program goes just fine but when I hit keys on the keyboard, nothing happens to the quadrotor. I'm running on Ubuntu 14.04 LTS and ROS Indigo. If anyone could give me suggestions on what to echo or look into to fix the connection between the keyboard controller and the sim quadrotor, that would be fantastic.

Thanks!!

Asked by jessiems10 on 2015-08-04 16:06:09 UTC

Comments

Answers

I guess you execute rosrun pr2_teleop teleop_pr2_keyboard, right?

Are you sure you have focus on the terminal where the teleop_pr2_keyboard node is running? Otherwise, the teleop doesn't catch the key presses.

Otherwise, it most probably is a problem with the topic connections. You can use rosrun rqt_graph rqt_graph to visualize all nodes and topics. Or, you can use rosnode info <TELEOPNODE> (replace <TELEOPNODE> with the node name of your teleop, probably pr2_base_keyboard) to see which topics this node has. And you can do the same with the node taking in the commands (don't know which one this is in your case).

Also, do a rostopic echo /cmd_vel to see any commands on the (default) topic.

Asked by mgruhler on 2015-08-05 02:07:19 UTC

Comments

Yes, I'm sure I am on that terminal alone. And when /cmd_vel is echoed this is the response: WARNING: no messages received and simulated time is active.

That would mean the source code is messed up and I'd have to dig to fix that, I think I went and tried the X-box controller and that made it work

Asked by jessiems10 on 2015-08-05 10:09:09 UTC

Well, this is the response if there is no msg sent on this topic. Have you, after the echo command, actually pressed the respective keys with focus on the terminal of the keyboard node?

If yes, please post the output of the rosnode info <YOURTELEOPNODE> command.

Asked by mgruhler on 2015-08-07 01:12:49 UTC

Refer to this answer. I think this is all you need to get the quadrotor up and running.

Asked by hvpandya on 2015-10-15 14:18:23 UTC

Comments

Hello, I have the same problem and solve it by using http://wiki.ros.org/teleop_twist_keyboard instead of teleop_pr2_keyboard

Asked by Trancept on 2016-01-15 06:02:28 UTC

Comments