일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 러닝 #운동 #동기부여
- Python
- 터미널 오류
- 나이퀴스트
- 백스테핑
- ROS2
- 우분투
- 오류
- 나이퀴스트선도
- lateral dynamics
- ros2humble
- 자동제어
- Isaac Sim
- 차량 동역학
- control
- 횡방향 동역학
- Backstepping
- humble
- #! /usr/bin/env python
- 비선형제어
- 궤환 선형화
- FL
- 제어공학
- 경로계획
- 보드선도
- 2024적금
- 강화학습
- 궤환선형화
- RL
- feedback linearization
- Today
- Total
목록Python with ROS (5)
내 머릿속
1. python 노드import rclpyfrom rclpy.node import Nodefrom std_msgs.msg import Stringclass PubSubNode(Node): def __init__(self): super().__init__('pub_sub_node') self.publisher_ = self.create_publisher(String, 'topic', 10) self.subscription = self.create_subscription(String, 'topic', self.listener_callback, 10) self.timer = self.create_timer(1.0, self.timer_callback) ..
1. workspace 생성mkdir -p colcon_ws/src 2. 파이썬 패키지 생성ros2에서는 패키지의 build_type을 설정함으로써 setup.py형태로 패키지 관리를 할것인지 package.xml 형태로 할것인지 결정.ros2 pkg create --build-type ament_cmake test_pkg 3. 빌드colcon build --symlink-install 4. 패키지 sourcesource install/local_setup.bash
1. Workspace 만들기mkdir -p /ros2_ws/srccd ros2_ws/srcgit clone -b https://github.com/ros/ros_tutorials.gitcd ..rosdep install -i --from-path src --rosdistro humble -ycolcon build 결과Starting >>> turtlesimFinished 2. 패키지 만들기cd srcros2 pkg create --build-type ament_python basic_pkgcd ..colcon build or colocn build --packages-select basic_pkgsource install/setup.bash
import numpy as nparr = np.array([[1,2,3],[4,5,6],[7,8,9]]) # 3x3result_row = np.minimum.reduce(arr,axis=1) # [1 4 7] # 각 행의 최솟값 result_col = np.minimum.reduce(arr,axis=0) # [1 2 3] # 각 열의 최솟값result = np.minimum.reduce(arr) # [1 2 3] 전체 배열의 최소값