Difference between revisions of "ROS Bridge RobotWebTools Keyboard Teleop"

From wikidb
Jump to: navigation, search
(Setup)
(Setup)
Line 41: Line 41:
 
   ---
 
   ---
 
   >    teleop.scale = ($('#speed-slider').slider('value') / 100.0);
 
   >    teleop.scale = ($('#speed-slider').slider('value') / 100.0);
 +
 +
* 13c13: This will get the keyboardteleop library from the RobotWebTools site instead of a local build directory.
 +
* 22c22: This will allow remote control from computers in the local network. The host computer's IP address is required because a local name server is not enabled.
 +
* 26,27d25 and 29a28: Removing the <tt>topic : '/base_controller/command'</tt> teleop field causes <tt>/cml_vel</tt> to be the Twist message topic.
 +
* 42c41 and 48c47: The Phidgets twist values range from 0 to roughly 5.

Revision as of 12:56, 19 February 2016

Overview

Adapt the RobotWebTools keyboard teleop example to the Floor Huger robot. This example will capture key events when the keyboard teleop page are in focus. The ROS Bridge Simple Keyboard test required that the focus is within the input textbox.

References

Get the keyboard teleop example. It is located in the examples directory.

 git clone https://github.com/RobotWebTools/keyboardteleopjs

Setup

Copy ../keyboardteleopjs/examples/keyboardteleop.html to ~eepp/public_html

Make the following edits capture by diff.

 13c13
 < <script src="http://cdn.robotwebtools.org/keyboardteleopjs/current/keyboardteleop.js"></script>
 ---
 > <script src="../build/keyboardteleop.js"></script>
 
 22c22
 <       url : 'ws://10.0.0.106:9090'
 ---
 >       url : 'ws://localhost:9090'
 
 26,27d25
 <     // default topic is  topic : '/cmd_vel'
 < 
 
 29a28
 >       topic : '/base_controller/command'
 
 42c41
 <         teleop.scale = (ui.value / 20.0);
 ---
 >         teleop.scale = (ui.value / 100.0);
 
 48c47
 <     teleop.scale = ($('#speed-slider').slider('value') / 20.0);
 ---
 >     teleop.scale = ($('#speed-slider').slider('value') / 100.0);
  • 13c13: This will get the keyboardteleop library from the RobotWebTools site instead of a local build directory.
  • 22c22: This will allow remote control from computers in the local network. The host computer's IP address is required because a local name server is not enabled.
  • 26,27d25 and 29a28: Removing the topic : '/base_controller/command' teleop field causes /cml_vel to be the Twist message topic.
  • 42c41 and 48c47: The Phidgets twist values range from 0 to roughly 5.