Professional Documents
Culture Documents
Tutorial
VIVES university of Applied Sciences
Researchgroup Smart Mobility
Jeremy Lebon
07/10/2020
1
Overview / agenda
• Introduction ROS
• Basics of ROS
2
Who am I?
associated with
4
Research group – Smart Mobility
Electrical vehicles Motorsport Mobile Automation
AGV
& Fuel cells & In-vehicle networks
SmartMobility@vives.be
5
In-house projects
AGV (UWB)
7
Current vehilce setup
No ROS implemented
LABO
CAN 1 CR0033
CAN 3 - 1000
CAN 2
CAN 4 - 500
Joystick
Roboteq CR0403
Rijden
Vooruit /
Stuurhuis achteruit
3
encoders
1
Autonomous driving primarly
2
Curtis
on GPS-RTK
motorcontroller
Centreer
sensor Stuurinrichting
8
New vehicle setup
With ROS implementation
3D camera Ethernet
CAN
USB
UWB
Sick Visionary Draadloos
Camera
GPS -RTK
IMU IH372
Encoders
Mti-630
9
Demo setup today
Catvehicle
Catvehicle Launch
Joystick Launch
RVIZ
Gazebo
RVIZ
Joystick Launch
10
References
CAT vehicle
Rahul Bhadani, Jonathan Sprinkle, Matthew Bunting. "The CAT Vehicle Testbed: A Simulator with
Hardware in the Loop for Autonomous Vehicle Applications". Proceedings 2nd International
Workshop on Safe Control of Autonomous Vehicles (SCAV 2018), Porto, Portugal, 10th April 2018,
Electronic Proceedings in Theoretical Computer Science 269, pp. 32–47.
Download: http://dx.doi.org/10.4204/EPTCS.269.4.
ROSbot
https://husarion.com/
11
ROS introduction
12
ROS introduction
Before ROS
13
What is ROS?
14
History ROS
https://www.openrobotics.org/
15
ROS Philosophy
Peer to peer
Individual programs communicate over defined API (ROS
messages, services, etc.).
Distributed
Programs can be run on multiple computers and communicate
over the network.
Multi-lingual
ROS modules can be written in any language for which a client
library exists (C++, Python,MATLAB, Java, etc.).
Light-weight
Stand-alone libraries are wrapped around with a thin ROS layer.
Free and open-source
Most ROS software is open-source and free to use.
16
ROS benefits
• Open-Source
• Vibrant Community
• Comprehensive library of
hardware (> 130 robots)
• Powerful ROS Tools E.g.:
Build, Visualization,
Transform, Graph
17
ROS benefits
https://metrics.ros.org/
18
ROS information
• Wiki.ros.org
• answers.ros.org
• https://discourse.ros.org/
19
ROS Wiki
20
ROS answers
21
ROS Discourse
22
ROS versions
ROS ROS2
23
Autoware Foundation
24
Apex.AI
25
ROS 2
Why?
26
ROS 2
Key features
> ament_tools
27
ROS 2
Architecture
28
How to get / start with ROS1
29
ROS Filesystem
• ROS packages
30
ROS Filesystem Catkin is a collection of cmake macros and
associated python code used to build some
Workspace environment parts of ROS
31
ROS Filesystem
ROS Packages
https://wiki.ros.org https://index.ros.org
33
ROS Filesystem
Packages from source
Source Repositories: When?
• “Latest” code When Stable version for ROS version
• Manual compilation isn’t available
• Allows code adjustments
> catkin_make
34
ROS Filesystem
Folder structure
35
ROS components
• ROS master
• ROS node
• ROS launch
• ROS topics
• ROS message
• ROS service
• ROS parameter
36
ROS Master
> roscore
37
ROS node
• ROS executable
– Binaries of C++ files (uses roscpp ROS client library)
– Python scripts (uses rospy ROS client library)
• Processes that perform computation
• A ROS system is composed of many different nodes. Each
with a specific task: Camera, LIDAR, navigation,…)
• Needs a ROS master to function
• Command to start ROS node
> Rosrun <package_name> <executable_name> [arguments]
39
Launch-file
• XML base
• Possible to start multiple nodes at the same time
– Supports arguments
– Supports parameters
– Nodes can be grouped
– Communication of nodes can be configured
• Starts a ROS master (if none exists)
40
Launch-file
Example
41
ROS Topics
• Asynchronous streaming
• Multiple concurrent publisher
and subscribers for one topic
• A single node can publish and
subcribe to multiple topics
• Works like a “chat room”
43
ROS Messages types (*.msg)
44
ROS parameter
Parameter server
• Allows data to be stored by key in a central location
• Global viewable
• Not designed for high-performance
– Query Only
• Most suitable for configuration information
45
ROS Commands - overview
46
Demo setup today
Catvehicle
CAT vehicle
Rahul Bhadani,
Jonathan Sprinkle,
Matthew Bunting. "The
CAT Vehicle Testbed: A
Simulator with Catvehicle Launch
Hardware in the Loop Joystick Launch
for Autonomous
Vehicle Applications".
Proceedings 2nd
International
Workshop on Safe
Control of Autonomous
Vehicles (SCAV 2018),
Porto, Portugal, 10th
April 2018, Electronic
Proceedings in
Theoretical Computer
Science 269, pp. 32–47.
Download: http://dx.do
i.org/10.4204/EPTCS.26
9.4.
RVIZ
Gazebo
RVIZ
Joystick Launch
47
ROS Tools
• Rqt – tools
• Gazebo
• Rviz
• Others
– PCL
– OpenCV
– Movit
48
ROS tools
RVIZ
49
ROS tools
Gazebo
50
ROS tools
rqt
qt-based framework for ROS GUIs
51
ROS tools
rqt
qt-based framework for ROS GUIs
52
ROS tools
Others
53
‘Autonomous’ navigation
ROSbot
https://husarion.com/
54
Demo Rosbot
ROSbot
https://husarion.com/
55
Navigation Package
56
Gmapping
57
ACML
Adaptive Monte Carlo Localization
• a probabilistic localization system for a robot moving in 2D
• implements the adaptive Monte Carlo localization approach
• uses a particle filter to track the pose of a robot against a known map
• subscribes to (default):
– Laser scans : /scan (sensor_msgs/LaserScan)
– Transforms : /tf (tf/tfMessage)
– initial pose : /initialpose
– (geometry_msgs/PoseWithCovarianceStamped)
– map : /map (nav_msgs/OccupancyGrid)
• publishes (default):
– robot’s estimated pose in the map, with covariance: /amcl_pose
(geometry_msgs/PoseWithCovarianceStamped)
– pose estimates being maintained by the filter:
/particlecloud (geometry_msgs/PoseArray)
– the transform from odom : /tf (tf/tfMessage)
58