About me
home
Portfolio
home

Unitree Ros to Real

진행 상태
완료
팀원
마감일
태그
작업 (하위 작업)에 관계됨
3 more properties

1. 패키지 구조 및 기능

구동 방법 2가지

1-1) ros_udp 노드

high level 일때
roslaunch unitree_legged_real real.launch ctrl_level:=highlevel
Bash
복사
low level 일때
roslaunch unitree_legged_real real.launch ctrl_level:=lowlevel
Bash
복사

1-2) 동작 하고 싶은 코드의 노드 실행

걷기와 position제어
# high level rosrun unitree_legged_real ros_example_walk # low level rosrun unitree_legged_real ros_example_postion
Bash
복사
low level전 주의사항
And before you do the low-level control, please press L2+A to sit the robot down and then press L1+L2+start to make the robot into mode in which you can do joint-level control, finally make sure you hang the robot up before you run low-level control.

1-3) state를 받아오고 싶을 때

로봇의 state를 받아오고 싶을 때 (제어가 돌아가고 있어야 state를 읽어올 수 있음)
rosrun unitree_legged_real state_sub
Bash
복사

2-1) 키보드로 동작

roslaunch unitree_legged_real keyboard_control.launch
Bash
복사
위 명령어를 사용시, ros_udp노드는 동작중이면 안됨

2. 코드 정리

1) unitree_legged_msgs/HighCmd.msg

uint8[2] head uint8 levelFlag uint8 frameReserve uint32[2] SN uint32[2] version uint16 bandWidth uint8 mode uint8 gaitType uint8 speedLevel float32 footRaiseHeight float32 bodyHeight float32[2] position float32[3] euler float32[2] velocity float32 yawSpeed BmsCmd bms LED[4] led uint8[40] wirelessRemote uint32 reserve uint32 crc
Bash
복사

2) unitree_legged_msgs/HighState.msg

uint8[2] head uint8 levelFlag uint8 frameReserve uint32[2] SN uint32[2] version uint16 bandWidth IMU imu MotorState[20] motorState BmsState bms int16[4] footForce int16[4] footForceEst uint8 mode float32 progress uint8 gaitType float32 footRaiseHeight float32[3] position float32 bodyHeight float32[3] velocity float32 yawSpeed float32[4] rangeObstacle Cartesian[4] footPosition2Body Cartesian[4] footSpeed2Body uint8[40] wirelessRemote uint32 reserve uint32 crc
Bash
복사

3. face LED ROS노드 추가

unitree nano에 led노드 run
rosrun led_light faceLedNode
Bash
복사
rostopic pub /ledColor std_msgs/String "data: 'green'”
green red blue black yellow white 6개 가능