Ask Your Question
0

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
1

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 imageyoshiros ( 2019-02-08 08:30:07 -0500 )edit

Thank you for your wonderful additional advice!

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

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

Seen: 564 times

Last updated: Feb 08