> For the complete documentation index, see [llms.txt](https://idminer.gitbook.io/robotis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://idminer.gitbook.io/robotis/part-3.-robotis-op3-ren-xing-ji-qi-ren/4.-robotis-ros-tao-jian/4.1.-robotis-op3/4.1.1.-robotis-ros-motion-mo-zu/4.1.1.5.-op3_online_walking_module.md).

# 4.1.1.5. op3\_online\_walking\_module

**Overview**

* 本節介紹了控制 OP3 在線行走的模組。該模組被編譯為要在 \[op3\_manager] 中使用的程式庫。在線步行演算法在這本書（[**Introduction to Humanoid Robotics**](http://www.springer.com/gp/book/9783642545351)）中有做說明。

**Getting Started**

* Download & Build
  * 參考： [**Installing ROBOTIS ROS Package**](http://emanual.robotis.com/docs/en/platform/op3/recovery/#installing-robotis-ros-packages)
* 用法。此 Motion 模組在 manager 中以程式庫的形式使用
  * 參考： [**Creating new robot manager**](http://emanual.robotis.com/docs/en/software/robotis_framework_packages/tutorials/#creating-new-robot-manager)

**ROS API**

* Subscribed Topics
  * **/robotis/online\_walking/reset\_body** ([std\_msgs/Bool](http://emanual.robotis.com/docs/en/popup/std_msgs_bool_msg/))&#x20;
    * 此消息將身體姿態重置為預設值。
  * **/robotis/online\_walking/goal\_joint\_pose** ([op3\_online\_walking\_module\_msgs/JointPose](http://emanual.robotis.com/docs/en/popup/op3_JointPose.msg/))&#x20;
    * 此消息將在 joint space 關節空間中設置所需的姿態。
  * **/robotis/online\_walking/goal\_kinematics\_pose** ([op3\_online\_walking\_module\_msgs/KinematicsPose](http://emanual.robotis.com/docs/en/popup/op3_KinematicsPose.msg/))&#x20;
    * 此消息將在 task space 任務空間中設置所需的姿態。
  * **/robotis/online\_walking/foot\_step\_command** ([op3\_online\_walking\_module\_msgs/FootStepCommand](http://emanual.robotis.com/docs/en/popup/op3_FootStepCommand.msg/))&#x20;
    * 此消息將設置步行指令。
  * **/robotis/online\_walking/foot\_step\_command** ([op3\_online\_walking\_module\_msgs/FootStepCommand](http://emanual.robotis.com/docs/en/popup/op3_FootStepCommand.msg/))&#x20;
    * 此消息將執行所需的步行效能。
  * **/robotis/online\_walking/walking\_param** ([op3\_online\_walking\_module\_msgs/WalkingParam](http://emanual.robotis.com/docs/en/popup/op3_online_WalkingParam.msg/))&#x20;
    * 此消息將設置步行參數。
  * **/robotis/online\_walking/body\_offset** ([geometry\_msgs/Pose](http://emanual.robotis.com/docs/en/popup/geometry_msgs_Pose_msg/))&#x20;
    * 此消息將設置所需的身體偏移值。
  * **/robotis/online\_walking/foot\_distance** ([std\_msgs/Float64](http://emanual.robotis.com/docs/en/popup/std_msgs_float64_msg/))&#x20;
    * 此消息將設置左腳和右腳之間所需的腳距。
  * **/robotis/online\_walking/footsteps\_2d** ([op3\_online\_walking\_module\_msgs/Step2DArray](http://emanual.robotis.com/docs/en/popup/op3_Step2DArray.msg/))&#x20;
    * 此消息將從 foot step generator 腳踏生成器設置所需的腳步。
* Published Topics
  * **/robotis/status**([robotis\_controller\_msgs/StatusMsg](http://emanual.robotis.com/docs/en/popup/StatusMsg.msg/))&#x20;
    * 此消息通知 head\_control\_module 的狀態。
  * **/robotis/movement\_done** ([std\_msgs/String](http://emanual.robotis.com/docs/en/popup/std_msgs_string/))&#x20;
    * 此消息通知動作已結束。
  * **/robotis/pelvis\_pose** ([geometry\_msgs/PoseStamped](http://emanual.robotis.com/docs/en/popup/geometry_msgs_PoseStamped_msg/))&#x20;
    * 此消息發送所需的骨盆姿態的定位。
* Service Server
  * **/robotis/online\_walking/get\_joint\_pose** ([op3\_online\_walking\_module\_msgs/GetJointPose](http://emanual.robotis.com/docs/en/popup/op3_GetJointPose.srv/))&#x20;
    * 此服務用於獲得當前所需的關節姿態。
  * **/robotis/online\_walking/get\_kinematics\_pose** ([op3\_online\_walking\_module\_msgs/GetKinematicsPose](http://emanual.robotis.com/docs/en/popup/op3_KinematicsPose.msg/))&#x20;
    * 此服務用於獲得當前所需的運動學姿態。
* Service Client
  * **/robotis/online\_walking/get\_preview\_matrix** ([op3\_online\_walking\_module\_msgs/GetPreviewMatrix](http://emanual.robotis.com/docs/en/popup/op3_GetPreviewMatrix.srv/))&#x20;
    * 此服務用於計算在線步行的矩陣。
