2. Speaker
SJ Kim (Seongjun Kim)
- Embedded Software Engineer for 6 years
- MCUs, Linux, Web development
- My goals
1. Build autonomous robots
2. Make my robot runs errand for me
3. Easy web interface for SLAM and navigation
2
• SLAM: Simultaneous localization and mapping
• Navigation: the act, activity, or process of finding the way to get to a place
when you are traveling in a ship, airplane, car, etc. (Merriam-Webster)
3. Table & Contents
- Before ROS - pyKobuki (GUI app for turtlebot)
- Why ROS?
- Essential Concepts & Commands
- ROS installation
- Project 1 - SULCATA (ROS stack for SLAM)
- Project 2 - Gazebo Factory (steps for original robot)
- Project 3 - Web and ROS
- What's Next?
- Q & A
- Reference
3
4. Before ROS (pyKobuki)
- https://github.com/bus710/pyKobuki
- A GUI application for driving Kobuki
- Python, Tkinter, threading, serial comm.
https://youtu.be/1CXgpq7vz8k
4
5. Before ROS (pyKobuki) (cont.)
- Target features: TCP socket, Kinect, SLAM, Manipulator
- A new feature requires a new thread.
- New features cause high complexity/time sensitivity.
- An error from a thread can stop other threads.
Kobuki
OS
Python runtime
Main process
SerialQ ParserGUI
PC
USB
TCP socket
Kinect
Manipulator
5
SLAM
6. Why ROS?
- Meta OS, Stable middleware, and Modular design
- Several message types (topic, service, and action)
- Various useful packages (Drivers, DSP, and ML)
- Supports several languages (c/c++, java, js, golang, …)
- Free Open Source Software
- Promising roadmap (sync w/ Ubuntu LTS)
6
Kobuki
OS
ROS
MLWebGUI
PC
Manipulator Kinect
Driver
DSP Planner
7. Essential Concepts & commands
- Roscore: ROS itself.
- Rosrun: runs a single node in a package.
- Roslaunch: runs multiple nodes across multiple packages.
- Catkin: is an extension of cmake for ROS.
- Message between Publisher/Subscriber nodes.
- Topic: message stream between pub/sub nodes.
- Service: is RPC. a node can call another nodes’ func.
- Action: can initiate a long-running task.
7
9. Project 1 - SULCATA
- A type of tortoise species, which live in the ground.
- Kinect v2, Kobuki, Kobuki supporter kit
- USB Type A to B, Camera mounting screw
- Molex PN : 5566-02B2
9NVIDIA-TK1 (ARM based) Intel I-5 (x64 based)
VS.
10. Project 1 - SULCATA (cont.)
- Summary for the stack
10
kobuki
Ubuntu
kobuki-slamkobuki-
keyop
rviz
PC
Kinect v2
kobuki-driver
urg-node
libkinect2
iai-kinect2kobuki-node
depth to
laser
ROS 1
235
46
(1) iai-Kinect sends depth image to the dimension converter node.
(2) The converter sends 2D value to urg-node.
(3)&(4) kobuki-slam reads 2D value and tf (time frame) from each nodes.
(5) Rviz visualizes data on GUI.
(6) keyop sends topics for driving kobuki.
11. Project 1 - SULCATA (cont.)
- Installation & Launch
https://github.com/bus710/sulcata
11
- libkinect2 supports several GPUs (NVIDIA, AMD, Intel, ARM).
- Read the official document carefully to install the driver on your machine.
12. Project 2 - Gazebo Factory
- Gazebo is OSRF’s 3D robot simulator.
- Supports ground, flight, underwater env. & robot.
- Various physics engines (ODE, Bullet, Simbody, and DART)
- Compatible with ROS. Good for proof of concept.
12
UbuntuPC
ROS
Model System World
World
Plugin
System
plugin
Model
plugin
Gazebo
15. Project 3 - Web and ROS
- ROS bridge package supports web socket.
- A good fit for real-time web applications.
- Any computer has web browser. (no install for client)
- There is a missing link between ROS bridge and browser.
- Browser requires web page before it accesses web socket
15
ROS coreROS bridge
Web
browser
???
Client Robot
This layer must deliver web page for browser
16. Project 3 - Web and ROS (cont.)
- To deliver web pages, we need a web server.
- Node.js has lightweight web server, Express.
16
Node.js stack ROS stackWeb Browser
Client Robot
User starts
- ROS core.
- ROS simulator node.
- ROS bridge (port 9090).
User starts node stack
(port 3000).User accesses Robot via web
browser. Then, Web browser
requests index.html.
Node returns index.html.
Web browser requests client.js
Node returns client.js.
User clicks button on web.
Then, the loaded Client.js
sends JSON packet via
WebSocket (port 9090).
ROS bridge
- Converts JSON to ROS topic.
- Assigns topic to simulator.
1
2
3
4
n User actions Http exchange Web socket access
17. Project 3 - Web and ROS (cont.)
- Installation & Launch
https://github.com/bus710/rosbridge-usage
- Result
18. What's next
- Build a combination with SULCATA + ROS Bridge.
- Research on robotics topics about SLAM & navigation.
- Eventually, make my robot runs errands for me.
18
20. Reference
20
[1] http://wiki.ros.org/
[2] http://gazebosim.org/
[3] https://github.com/OpenKinect/libfreenect2
[4] https://github.com/code-iai/iai_kinect2
[5] https://github.com/robotpilot/rosbook_kr
[6] “Programming Robots with ROS”, Morgan Quigley, Brian Gerkey, and William D. Smart
[7] http://wiki.ros.org/urg_node
[8] http://wiki.ros.org/depthimage_to_laserscan
[9] OROCA, the best ROS community in Korea