User input to NRP


#1

Hi there,

What would currently be the best way to provide user input to the NRP during an experiment?
for instance to set the speed/direction of the robot (i.e. provide user input to the brain).

Key strokes + state machines?

Preferably it would be a visual interface though.

Thanks,

Alexander


#2

Hi Alex,

unfortunately, there is currently no properly supported way to do that. You can of course fetch keystrokes, but that will only work in the local install. On the web platform, the unfortunate answer is that there is no way to achieve that.

We had discussed such an editor in the last performance show but I just noticed that this has not made its way even to the backlog. Therefore, I just added a new story to provide just that. However, the story is just created, not yet in the sprint nor in the master branch.

Best,

Georg


#3

Hello, Alex!

To provide some further input to Georg’s answer, he is right, there is currently no way to achieve keyboard-based control from the platform’s web frontend.
However, since the web frontend is capable of talking to ROS, there might be a way to forward keyboard commands to simulated robot. Depending on which type of robot you want to control, there are ROS packages that provide keyboard-based teleoperation via ROS topics, e. g.:

To enable control from the web frontend, key presses as captured by the browser would need to be converted to the respective control message types of one of these packages and sent via rosbridge to the NRP backend.

With best regards,
Fabian


#4

Ok thanks,

will try that


#5

Hey Alex,

just for reference, which robot would you like to control. And do you know, which ROS topic/message you’d like to use?

best,
Mahmoud


#6

Hi,

that would be for Tigrillo,

I will try to use the joystick of a game controller (like for ps2) :

http://wiki.ros.org/joy/Tutorials/ConfiguringALinuxJoystick

To set a ‘high level input’ to the brain, in order to control the robot with simple commands (e.g. turn left)

Alexander