Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @SuBamm88
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ capstone_project/

## 빠른 시작

### 환경
- Ubuntu 22.04
- ROS 2 Humble

### 의존성 설치
```bash
rosdep install --from-paths src --ignore-src -r -y
```

### 빌드
```bash
source /opt/ros/humble/setup.bash
colcon build
source install/setup.bash
```

## 팀 협업 규칙

1. `main` 브랜치에서는 절대 작업하지 않는다.
Expand Down
111 changes: 111 additions & 0 deletions docs/scout_operation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
## 실행 전

- SCOUT MINI와 CAN 연결 완료
- Velodyne VLP-32C 연결 완료

아래 명령 예시는 워크스페이스 루트에서 실행한다고 가정한다.


### 1. CAN 인터페이스 up + SCOUT MINI base 실행

```bash
sudo ip link set can0 up type can bitrate 500000
ros2 launch scout_base scout_mini_base.launch.py
```
```bash
ros2 launch scout_description scout_base_description.launch.py
```

```bash
ros2 launch scout_description scout_base_description.launch.py
```

설명:

- SCOUT MINI base driver 실행
- `/odom` publish
- `odom -> base_link` TF publish

### 2. Velodyne 정적 TF 실행

`base_link -> velodyne`


```bash
ros2 run tf2_ros static_transform_publisher 0 0 0.6 0 0 0 base_link velodyne
```

### 3. Velodyne 드라이버 및 포인트클라우드 실행

```bash
ros2 launch velodyne velodyne-all-nodes-VLP32C-composed-launch.py
```

설명:

- Velodyne 드라이버 실행
- PointCloud 관련 노드 실행

## Mapping

맵 작성 단계에서는 `slam_toolbox`를 사용한다.

```bash
ros2 launch bringup_pkg scout_slam.launch.py
```

설명:

- `/scan` 기반으로 맵 생성
- SLAM 중에는 `slam_toolbox`가 `map -> odom`을 publish

맵이 충분히 생성되면 다른 터미널에서 저장:

```bash
ros2 run nav2_map_server map_saver_cli -f src/bringup_pkg/maps/scout_mini_map
```

저장 결과:

- `src/bringup_pkg/maps/scout_mini_map.pgm`
- `src/bringup_pkg/maps/scout_mini_map.yaml`

## Nav2

맵 저장 후 SLAM은 종료하고, 저장된 맵을 사용해 Nav2를 실행한다.

```bash
ros2 launch bringup_pkg scout_cctv_nav2.launch.py

```

설명:

- 저장된 맵 로드
- `map_server`, `amcl`, `navigation` 실행

## RViz2

1. RViz2 실행
2. `Fixed Frame`을 `map`으로 설정
3. `2D Pose Estimate`로 현재 위치와 방향 지정
4. 위치 추정이 안정되면 `Nav2 Goal` 또는 `2D Goal Pose`로 목표 지정

주의:

- `map -> odom`은 static TF로 직접 고정하지 않는다.
- Nav2 단계에서는 `AMCL`이 `map -> odom`을 publish해야 한다.

## TF tree

정상 동작 기준 TF 구조:

```text
map -> odom -> base_link -> velodyne
```

역할:

- `map -> odom`: SLAM 또는 AMCL
- `odom -> base_link`: scout_base
- `base_link -> velodyne`: static TF
Binary file added frames_2026-05-11_20.39.11.pdf
Binary file not shown.
Binary file added perception 초안.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions src/README.md

This file was deleted.

File renamed without changes.
23 changes: 23 additions & 0 deletions src/bringup_pkg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.8)
project(bringup_pkg)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)

install(DIRECTORY
launch
config
rviz
maps
DESTINATION share/${PROJECT_NAME}
)

install(FILES
README.md
DESTINATION share/${PROJECT_NAME}
)

ament_package()
62 changes: 62 additions & 0 deletions src/bringup_pkg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# bringup_pkg

Project-level launch and tuning package for the current capstone stack.

This package does not replace or wrap the low-level runtime of:

- `scout_base`
- `scout_description`
- `velodyne_*`
- `pointcloud_to_laserscan`

Those should be launched and debugged independently.

This package is reserved for the upper software stack:

- `slam_toolbox`
- `nav2`

It stores only project-specific launch files and tuning files for those layers.

Current layout:

- `launch/`
- SLAM / Nav2 entrypoints
- `config/`
- SLAM / Nav2 tuning YAML files
- `rviz/`
- RViz presets
- `maps/`
- saved maps

## CCTV costmap demo

Build the CCTV demo packages from the workspace root:

```bash
colcon build --symlink-install --packages-select cctv_costmap_layer cctv_object_tools bringup_pkg
source install/setup.bash
```

Run Nav2 with the CCTV costmap layer:

```bash
ros2 launch bringup_pkg scout_cctv_nav2.launch.py
```

In another terminal, run the RViz click-to-PoseArray demo publisher:

```bash
ros2 launch cctv_object_tools rviz_click_to_pose_array.launch.py
```

Use RViz `Publish Point` with fixed frame `map`. Clicked points are published as
`geometry_msgs/msg/PoseArray` on `/cctv/objects_map`, then the custom costmap
layer marks them as obstacles before Nav2 inflation.

Clear or undo demo objects:

```bash
ros2 service call /cctv/clear_objects std_srvs/srv/Empty
ros2 service call /cctv/remove_last_object std_srvs/srv/Empty
```
Loading