×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Robot Web Tools Bringing robots to your favorite browser
Slide 2
Slide 2 text
Previously ros.js 1.0 rosbridge 1.0 wviz
Slide 3
Slide 3 text
Previously
Slide 4
Slide 4 text
We learned A Lot
Slide 5
Slide 5 text
Need more: Modular Robust Community Web Standard
Slide 6
Slide 6 text
No content
Slide 7
Slide 7 text
.org
Slide 8
Slide 8 text
New Tools rosbridge 2.0 roslibjs ros2djs ros3djs
Slide 9
Slide 9 text
Alright, I’m intrigued. How does it work?
Slide 10
Slide 10 text
Let’s do some H T M L
Slide 11
Slide 11 text
ROSCon 2013!
HTML
Slide 12
Slide 12 text
python -m SimpleHTTPServer Server
Slide 13
Slide 13 text
No content
Slide 14
Slide 14 text
We need a server to ROS
Slide 15
Slide 15 text
sudo apt-get install ros-groovy-rosbridge-suite rosbridge roslaunch rosbridge_server rosbridge_websocket.launch
Slide 16
Slide 16 text
...and a connection to the robot
Slide 17
Slide 17 text
</head> <body> ... <div id=”pose”></div> </body> HTML
Slide 18
Slide 18 text
var ros = new ROSLIB.Ros(); ros.connect( ‘ws://localhost:9090’ ); roslibjs
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
Now, let’s get some robot data
Slide 21
Slide 21 text
var poseTopic = new ROSLIB.Topic({ ros : ros, name : '/robot_pose', messageType : 'geometry_msgs/Pose' }); roslibjs
Slide 22
Slide 22 text
poseTopic.subscribe( function(pose) { console.log(pose); } ); roslibjs
Slide 23
Slide 23 text
No content
Slide 24
Slide 24 text
What’s a pose without a map?
Slide 25
Slide 25 text
<script src=”ros2d.js”> </head> <body> ... <div id="map"></div> </body> HTML
Slide 26
Slide 26 text
var viewer2D = new ROS2D.Viewer({ divID : 'map', width : 300, height : 300 }); ros2djs
Slide 27
Slide 27 text
gridClient = new ROS2D.OccupancyGridClient({ ros : ros, rootObject : viewer2D.scene }); ros2djs
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
We have a pose We have a map Let’s combine
Slide 30
Slide 30 text
var robotMarker = new ROS2D.NavigationArrow({ size : 12, strokeSize : 1, pulse : true }); ros2djs
Slide 31
Slide 31 text
poseTopic.subscribe( function(pose) { robotMarker.x = pose.position.x; robotMarker.y = -pose.position.y; }); ros2djs
Slide 32
Slide 32 text
gridClient.rootObject .addChild(robotMarker); ros2djs
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
You know what’s cooler than 2D? 3D
Slide 35
Slide 35 text
<script src=”ros2d.js”> <script src=”ros3d.js”> </head> <body> ... <div id="model"></div> </body> HTML
Slide 36
Slide 36 text
var viewer3D = new ROS3D.Viewer({ divID : 'threed-map', width : 600, height : 300, }); ros3djs
Slide 37
Slide 37 text
var tfClient = new ROSLIB.TFClient({ ros : ros, angularThres : 0.01, transThres : 0.01, rate : 10.0 }); ros3djs
Slide 38
Slide 38 text
var urdfClient = new ROS3D.UrdfClient({ ros : ros, tfClient : tfClient, path : resourceUrl, rootObject : viewer3D.scene }); ros3djs
Slide 39
Slide 39 text
No content
Slide 40
Slide 40 text
var grid3D = new ROS3D.OccupancyGridClient({ ros : ros, tfClient : tfClient, rootObject : viewer3D.scene }); ros3djs
Slide 41
Slide 41 text
No content
Slide 42
Slide 42 text
var mesh = new ROS3D.MeshResource({ path : resourceUrl, resource : 'willow.dae' }), ros3djs
Slide 43
Slide 43 text
var building = new ROS3D.SceneNode({ tfClient : tfClient, frameID : '/map', object : mesh, pose : pose }); ros3djs
Slide 44
Slide 44 text
viewer3D.addObject(building); ros3djs
Slide 45
Slide 45 text
No content
Slide 46
Slide 46 text
Widgets
Slide 47
Slide 47 text
The Future
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
Special Thanks Russell Toris Jihoon Lee David Gossow
Slide 50
Slide 50 text
RobotWebTools.org Brandon Alexander https://github.com/baalexander @bacealexander