Skip to content

Commit 0b36349

Browse files
committed
added introduction to ROS2 post
1 parent 80acfe5 commit 0b36349

32 files changed

+972
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
```bash
17+
$ cd ../../ # come to the workspace home directory
18+
$ colcon build # this will build all the packages inside src
19+
$ source install/setup.bash # source the workspace
20+
$ ros2 launch slam slam.launch.py
21+
```
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)