3 분 소요

Hits

로보티즈 터틀봇3 시뮬레이션

cd ~/turtlebot3_ws/src/
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/turtlebot3_ws && colcon build --symlink-install

gazebo 설치

sudo apt install ros-foxy-gazebo-*

turtlebot3 설치

sudo apt install ros-foxy-turtlebot3*

# sudo apt install ros-foxy-turtlebot3-gazebo
# sudo apt install ros-foxy-turtlebot3-msgs

tutlebot3 simulation을 실행 후 ROS2 CLI 명령어로 정보 확인하기

ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
ros2 topic list

/*
/clock
/cmd_vel
/imu
/joint_states
/odom
/parameter_events
/performance_metrics
/robot_description
/rosout
/scan
/tf
/tf_static
*/
ros2 topic type /cmd_vel

/*
geometry_msgs/msg/Twist
*/
ros2 topic type /scan

/*
sensor_msgs/msg/LaserScan
*/
cat /opt/ros/foxy/share/sensor_msgs/msg/LaserScan.msg
ros2 topic echo /scan

아래와 같은 정보가 나오는데 - - - 로 반복해준다.
레이더로 거리를 측정한 값을 보여주는데 장애물에 부딪히지 않고 끝까지 간 경우 .inf 로 나타낸다.

---
header:
  stamp:
    sec: 347
    nanosec: 401000000
  frame_id: base_scan
angle_min: 0.0
angle_max: 6.28000020980835
angle_increment: 0.01749303564429283
time_increment: 0.0
scan_time: 0.0
range_min: 0.11999999731779099
range_max: 3.5
ranges:
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- 3.0582165718078613
- 3.0241169929504395
- 3.019754409790039
- 2.013763427734375
- 1.9856795072555542
- 1.948339819908142
- 1.9367854595184326
- 1.9440979957580566
- 1.943268060684204
- 1.9479233026504517
- 1.9877747297286987
- .inf
- .inf
- .inf
- 0.9902486205101013
- 0.9414001107215881
- 0.9330304861068726
- 0.9232556819915771
- 0.9300105571746826
- 0.9106385707855225
- 0.924481213092804
- 0.9105859398841858
- 0.9030020833015442
- 0.9116163849830627
- 0.9136989712715149
- 0.9052510857582092
- 0.9171230792999268
- 0.957747220993042
- 0.9810773134231567
- 1.0122859477996826
- 2.4367904663085938
- 2.4365363121032715
- 2.4128005504608154
- 2.4618146419525146
- 2.516110897064209
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- .inf
- 1.7563879489898682
- 1.715218424797058
- 1.716332197189331
- 1.6988532543182373
- 1.7058846950531006
- 1.7069318294525146
- 1.7188464403152466
- 1.7494845390319824
- 1.804458737373352
- 3.340061902999878
- 3.341921329498291
- 3.2981672286987305
- 3.2861180305480957
- 3.2389607429504395
- 3.225423574447632
- 3.231285333633423
- 3.196723222732544
- 3.073796033859253
- 2.8678627014160156
- 2.6851491928100586
- 2.5602240562438965
- 2.5606465339660645
- 2.538172960281372
- 2.544053316116333
- 2.550006866455078
- 2.5364344120025635
- 2.5117321014404297
- 2.541796922683716
- 2.5156400203704834
- 2.4279160499572754
- 2.3291687965393066
- 2.2564327716827393
- 2.1721057891845703
- 2.115628480911255
- 2.055629253387451
- 1.974146842956543
- 1.9506876468658447
- 1.879772663116455
- 1.8218913078308105
- 1.8104169368743896
- 1.7512900829315186
- 1.716362714767456
- 1.6654536724090576
- 1.63184654712677
- 1.5955030918121338
- 1.580954670906067
- 1.538205862045288
- 1.5027120113372803
- 1.4719213247299194
- 1.4413113594055176
- 1.4320321083068848
- 1.3993680477142334
- 1.373850703239441
- 1.3652151823043823
- 1.332464337348938
- 1.3060784339904785
- 1.3044440746307373
- 1.2909373044967651
- 1.267951250076294
- 1.2489559650421143
- 1.2368887662887573
- 1.2305915355682373
- 1.1978555917739868
- 1.2069110870361328
- 1.1976932287216187
- 1.1887149810791016
- 1.1584810018539429
- 1.1636221408843994
- 1.154280185699463
- 1.1418572664260864
- 1.104804277420044
- 1.1311993598937988
- '...'
intensities:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- '...'
---

태그:

카테고리:

업데이트:

Comments