Skip to content

Commit

Permalink
from node
Browse files Browse the repository at this point in the history
  • Loading branch information
songdaegeun committed Jun 9, 2024
1 parent 23834a2 commit 2147610
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 4 deletions.
13 changes: 10 additions & 3 deletions _posts/2024-06-09-2-ros1-in-m1-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ layout: post
title: 2_ros1_in_m1_mac
date: 2024-06-09 18:28 +0900
author: songdaegeun
categories:
tags:
categories: ["ros1", "noetic"]
tags: ["ros1", "noetic"]
pin: false
math: true
---
Expand Down Expand Up @@ -57,10 +57,17 @@ source ~/miniforge3/bin/activate

2. robostack channel을 통해 conda-forge에서 ros noetic 설치
[robostack docs](https://robostack.github.io/GettingStarted.html)
~/miniforge3/envs/ros_env가 home이 된다.

추가로 ros1 tutorial을 참고하여 다음과 같이 설정하였다.
[ROS1 tutorial](https://wiki.ros.org/ROS/Tutorials)
- catkin workspaces
- zsh기준이다. (ws의 src에서 catkin_make할 때마다 source devel/setup.zsh해야한다.)

#### ros1 기본 기능 test

#### ros1 기본 기능 test

~

#### 주의
1. Do not install ROS packages in the base environment
Expand Down
62 changes: 62 additions & 0 deletions _posts/2024-06-09-ros1-cheat-sheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
layout: post
title: ros1_cheat_sheet
date: 2024-06-09 20:32 +0900
author: songdaegeun
categories: ["ros1", "noetic"]
tags: ["ros1", "noetic"]
pin: false
math: true
---

ROS1은 shell environment를 사용하는 combining spaces의 개념에 의존하기 때문에,
shell environment가 제대로 setup되는 것이 중요하다.
다음 명령으로 ROS_PACKAGE_PATH, ROS_ROOT 등 유용한 변수들을 확인할 수 있다.
```
printenv | grep ROS
```

ws의 src에서 catkin_make할 때마다 다음의 명령을 실행해야한다.(zsh기준일때)
```
source devel/setup.zsh
```

다음은 ROS_PACKAGE_PATH내에 존재하는 package에 대한 명령들이다.
```
# package 위치출력
rospack find [package_name]
# package/stack(/subdir)으로 cd
roscd <package-or-stack>[/subdir]
# package/stack(/subdir)에 대해 ls
rosls <package-or-stack>[/subdir]
```

package의 dependency 출력
```
# first dependency
rospack depends1 rospy
# all nested dependency
rospack depends beginner_tutorials
```
package를 생성하는 방법
```
catkin_create_pkg <package_name> [depend1] [depend2] [depend3]
```
이후 dependency관련은 package.xml에서, build관련은 CMakeLists.txt에서 조정한다.

package를 빌드하는 방법
```
# package가 정의(CMakeLists.txt, [package name])된 directory가 'src'(default)인 경우
catkin_make
# package가 정의(CMakeLists.txt, [package name])된 directory가 'my_src'인 경우
catkin_make --source my_src
# CMake project 빌드 내부과정에 "make install"이 포함된 경우
catkin_make install # (optionally)
```

node

```
```
2 changes: 1 addition & 1 deletion _posts/2024-06-09-ros1-in-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: post
title: 1_ros1_in_m1_mac
date: 2024-06-09 15:29 +0900
author: songdaegeun
categories:
categories: ["ros1", "noetic"]
tags: ["ros1", "noetic"]
pin: false
math: true
Expand Down

0 comments on commit 2147610

Please sign in to comment.