Skip to content

Commit 5af9556

Browse files
Merge pull request #934 from soumya997/master
Robotics Blog Series: Intro to ROS2 article
2 parents 80acfe5 + 2e50370 commit 5af9556

31 files changed

+976
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Introduction to ROS2
2+
3+
<img src="media/intro-to-ros2.gif">
4+
<br>
5+
<br>
6+
<br>
7+
8+
**Blog: https://learnopencv.com/robot-operating-system-introduction**
9+
10+
11+
12+
ROS is a very common component in robotics and has many technical tutorials and resources available on the internet. However, through this blog, our objective is to provide a detailed understanding of the internal **workings of ROS2**, **how DDS works**, the **need for DDS**, the ROS1 middleware architecture, and the data flow in ROS2. Additionally, we discuss how to use this tool in Python, covering various topics such as packages, nodes, topics, publishers, subscribers, and services. At the end, for more hands-on understanding, we have created a capstone project where we **integrate Monocular SLAM with ROS2 using Python**. We hope this will serve as a beginner-friendly gateway for anyone who wants to learn ROS2 and get into robotics.
13+
14+
15+
## How to Run:
16+
17+
Donwload the test video from [this link](https://www.dropbox.com/scl/fi/qsck7st5h85e3sniw0daq/test_ohio.mp4?rlkey=h8n5mf4aue0hocj44d4rzocbf&st=t3vdoc5a&dl=1) and place it inside `src/slam/resource/videos/`.
18+
19+
20+
```bash
21+
$ cd ../../ # come to the workspace home directory
22+
$ colcon build # this will build all the packages inside src
23+
$ source install/setup.bash # source the workspace
24+
$ ros2 launch slam slam.launch.py
25+
```
453 KB
Loading
199 KB
Loading
158 KB
Loading
2.56 MB
Loading
962 KB
Loading
321 KB
Loading
867 KB
Loading
12.5 MB
Loading
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
from launch import LaunchDescription
2+
from launch_ros.actions import Node
3+
4+
5+
def generate_launch_description():
6+
ld = LaunchDescription()
7+
8+
video_pub = Node(
9+
package="slam",
10+
executable="vod_img_pub", # Ensure this matches the entry point defined in your setup.py or CMakeLists.txt
11+
name='vod_img_pub', # Optional, but useful for debugging
12+
arguments=['src/slam/resource/videos/test_ohio.mp4'],
13+
output='screen',
14+
emulate_tty=True, # Ensures proper handling of console output
15+
)
16+
17+
slam_pub = Node(
18+
package='slam',
19+
executable='slam_pub',
20+
name='slam_pub',
21+
output='screen',
22+
emulate_tty=True, # Optional, useful for debugging
23+
)
24+
25+
26+
rviz = Node(
27+
package="rviz2",
28+
executable="rviz2", # Ensure this matches the entry point defined in your setup.py or CMakeLists.txt
29+
output='screen',
30+
arguments=['-d' + 'src/slam/rviz/py_slam_ros2_v4.rviz']
31+
)
32+
33+
34+
ld.add_action(video_pub)
35+
ld.add_action(slam_pub)
36+
ld.add_action(rviz)
37+
38+
return ld

0 commit comments

Comments
 (0)