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

What is the best way to monitor and Remote control the Robot from Tablet?

asked 2019-02-07 13:02:40 -0500

yoshiros gravatar image

Hi,

I'm trying to make some Tablet GUI which can monitor and also remote control my robot.
My robot is already connected to wifi and ROS messages are well communicated between the Ubuntu computer which is connected to the same wifi. Well communicated means, the remote computer can subscribe the message which the robot published, and the robot can subscribe the message which the remote computer published. The robot is publishing its position and camera-image. The remote computer is publishing velocity command.
Now, I want to make a Tablet GUI which displays the robot position, camera-image, and some button which can control the robot's velocity.
The GUI doesn't need to be a dedicated application. Using a web browser should be fine.
I have two tablets. One is Android OS and the other is Windows OS. Android could be better for me.

What is the best way (Easy way) to make a Tablet GUI? Are there any tutorials for this situation?

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2019-02-07 15:32:37 -0500

billy gravatar image

updated 2019-02-08 22:43:37 -0500

ROSBRIDGE and robotwebtools.org will have everything you need. Both have tutorials to make it easy. I have remote interface that runs fine in safari on iPhone, chrome on android and windows, and firefox on ubuntu. In my case tested from one state to another(1500 Km) using controls and streaming video with minimal lag.

UPDATE after additional question:

My setup is personal hobby, so I just use an old laptop for the server running apache2 on ubuntu. It works fine for my limited case.

Nodes running on the laptop:

  • Full navigation stack and robot interface. AMCL, movebase, map server etc all standard. Robot interface is custom.

  • A few custom house keeping nodes that use voice and keyboard inputs to control robot state(sleeping, idle, navigating, etc) and issue goals to navigation stack, decode cmd_vel, etc.

  • Raspicam is running on a raspberry pi with camera to get video stream. I strongly suggest you find a different source than raspberry pi for video. Major pain to get working.

Nodes used to support the web interface:

  1. web_video_server

  2. robot_pose_publisher

  3. image_transport republish compressed in:=/raspicam_node/image/ out:=/convertedimage

  4. rosbridge_server rosbridge_websocket.launch

The HTML code below is one of the pages that displays the video stream, shows the location of the robot in the map, and has buttons for sending robot to predefined locations. The output from these buttons get published to a topic that is used for voice control local to the robot so the buttons get handled as though they are voice commands being issued to the robot from someone standing right there. The robot will not obey any voice command not preceeded by "robot" so the function for the buttons puts a "robot" on the topic prior to sending the intended location request. These buttons will not help you with your application but serve as one example on how to put info to topic from web interface.

One note: the file "Ros2D.js" from the robotwebtools.org site needs to be in the folder with your index.html file. I'm sure I am doing this is a non-standard way but have no need to fix it.

I am doing this using ROS Jade on Ubuntu 14.04.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://static.robotwebtools.org/EaselJS/current/easeljs.js"></script>
<script type="text/javascript" src="http://static.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
<script type="text/javascript" src="http://static.robotwebtools.org/roslibjs/current/roslib.min.js"></script>
<script src="https://static.robotwebtools.org/roslibjs/current/roslib.js"></script>
<script src="Ros2D.js"></script>

<script type="text/javascript">
  var pi_img = new Image(); 
  var ip = location.host;
</script>

<script type="text/javascript" type="text/javascript">
  var ip = String(location.host);
  var x = 0;
  var z = 0;
  var scale = 0;
  var scale_max = 0.2;
  var out_message = "";

  // Connecting to ROS
  // -----------------
  var newURL = "ws://" + ip + ":9090";
  var ros = new ROSLIB.Ros({
    url : newURL
  });

  ros.on('connection', function() {
    console.log('Connected ...
(more)
edit flag offensive delete link more

Comments

Thank you so much for your answer. Your job sounds wonderful! If you don't mind, could you tell me more detail? For example, what library and tools did you use for server? Thanks.

yoshiros gravatar image yoshiros  ( 2019-02-08 08:30:07 -0500 )edit

Thank you for your wonderful additional advice!

yoshiros gravatar image yoshiros  ( 2019-02-11 10:16:12 -0500 )edit

Would you have any advice on how to achieve this if my remote station is on a different network than my robot.

zulfiz gravatar image zulfiz  ( 2019-11-25 16:22:09 -0500 )edit

Hi @billi please describe more about your /recognizer/output topic. which package is running this node. please mention git repo link for the same.

Deepak_Kr_Yadav gravatar image Deepak_Kr_Yadav  ( 2020-02-03 08:06:51 -0500 )edit

That topic is published by pocketsphinx : http://wiki.ros.org/pocketsphinx It is the results of speech recognition. I use voice control as an input to a state-machine node I use to control the robot system. It is custom (no github) that controls robot hardware, monitors battery, issues goals to move-base, etc. Since the system uses that topic as the primary input for the state-machine, it made sense the webpage would issue to that same topic. And then the webpage was written so that it plays well with the expected state-machine input.

billy gravatar image billy  ( 2020-02-03 20:44:18 -0500 )edit

could this be used for a turtlebot in gazebo as well? just the mapping/camera to be displaying in the web interface

saintdere gravatar image saintdere  ( 2020-06-12 02:25:24 -0500 )edit

I don't know the first thing about Gazebo so cannot answer that question.

billy gravatar image billy  ( 2020-06-12 14:01:49 -0500 )edit

@saintdere yes you can

abdulhannan_r gravatar image abdulhannan_r  ( 2022-04-26 06:31:29 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2019-02-07 13:02:40 -0500

Seen: 5,333 times

Last updated: Feb 08 '19