1. 패키지 생성
catkin_create_pkg [name_of_package] std_msgs rospy
2. setup.py 파일 작성
cd [name_of_package]
아래 파일 작성, 이때 [name_of_package]는 패키지 이름 적기
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['[name_of_package]'],
package_dir={'': 'scripts'},
)
setup(**setup_args)
3. CMakeLists.txt 수정
# 주석 해제
catkin_python_setup()
4. 노드 작성
mkdir scripts
cd scripts
'Libraries & Packages > ROS' 카테고리의 다른 글
curl installation error (0) | 2023.12.18 |
---|---|
catkin build 실행 시 'ERROR: No matching distribution found for python3-empy' 에러 발생하는 경우 (0) | 2023.12.08 |
[ROS] rosbag 토픽 이름 변경 방법 (0) | 2023.10.18 |
[ROS] Launch 파일에서 rosbag play 방법 (0) | 2023.07.30 |
Error Could not find a package configuration file provided by "vision_msgs" with any of the following names: (0) | 2023.07.25 |