ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Dear Johan, not sure to understand correctly your question. Are you looking a friendly way to publish topics on ROS in order to control your robot easily? If yes I think some kind of teleop is what you need. Here you can find a good start point: this node look for pressed key on the keyboard a public a /cmd_vel topic according to pressed arrow key. Of course you can modify this code in order to publish any topic you need.

Faster (but dirty) solution is to define alias for commands like posted one: with this approach you have to type only a short alias instead the complete command. Here you can find more info about aliases.

I really suggest you the first way: you can take advantage of the opportunity to be more familiar with ROS world!

Dear Johan, not sure to understand correctly your question. Are you looking a friendly way to publish topics on ROS in order to control your robot easily? If yes I think some kind of teleop is what you need. Here you can find a good start point: this node look for pressed key on the keyboard a public a /cmd_vel topic according to pressed arrow key. Of course you can modify this code in order to publish any topic you need.

Faster (but dirty) solution is to define alias for commands like posted one: with this approach you have to type only a short alias instead the complete command. Here you can find more info about aliases.

I really suggest you the first way: you can take advantage of the opportunity to be more familiar with ROS world!

EDIT:

Tell me if my understanding is correct. You was using Arduino + OpenHAB connected via serial port. You was able to control your robot via a GUI developed in OpenHAB. Now you introduce ROS that use the same serial port to make able Arduino to communicate to ROSCore and you are looking to another way to put OpenHAB in the equation.

That's right?

Dear Johan, not sure to understand correctly your question. Are you looking a friendly way to publish topics on ROS in order to control your robot easily? If yes I think some kind of teleop is what you need. Here you can find a good start point: this node look for pressed key on the keyboard a public a /cmd_vel topic according to pressed arrow key. Of course you can modify this code in order to publish any topic you need.

Faster (but dirty) solution is to define alias for commands like posted one: with this approach you have to type only a short alias instead the complete command. Here you can find more info about aliases.

I really suggest you the first way: you can take advantage of the opportunity to be more familiar with ROS world!

EDIT:

Tell me if my understanding is correct. You was using Arduino + OpenHAB connected via serial port. You was able to control your robot via a GUI developed in OpenHAB. Now you introduce ROS that use the same serial port to make able Arduino to communicate to ROSCore and you are looking to another way to put OpenHAB in the equation.

That's right?

EDIT:

Since you have only one serial port you cannot connect Arduino to OpenHAB and ROS at same time. In my opinion serial port must be used by ROS. OpenHAB can send command to Arduino passing by ROS: OpenHAB must publish a topic in ROS that is subscribed by Arduino code. In the opposite way, in order to show some infos on GUI provided by Arduino, you should publish some topics from Arduino code subscribed by OpenHAB node. I'm doing something similar on my project: a Java SW provide the GUI and publish/subscribe ROS topic in order to interact with the robot. See here for OpenHAB integration in ROS.