welcom ! Handel home

2025年2月24日 星期一

(Robot_arm)RViz(Robot Visualization Tool) 及 MoveIt! 運動規劃 有關 Topic

 rviz 相關 Topic 說明

/rviz_2df67c129072_250828_289179306680875079/motionplanning_planning_scene_monitor/parameter_descriptions

/rviz_2df67c129072_250828_289179306680875079/motionplanning_planning_scene_monitor/parameter_updates

/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/feedback

/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update

/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update_full


這些Topci 與 RViz(Robot Visualization Tool)MoveIt! 運動規劃 有關。

它們用於 監控、更新運動規劃場景、以及處理 RViz 內的交互控制(Interactive Markers)


1️⃣ /rviz_*/motionplanning_planning_scene_monitor/parameter_descriptions

📌 作用

  • 提供 MoveIt! 運動規劃監視器(Planning Scene Monitor)內所有可調參數
  • 包括 環境監視頻率、障礙物感知參數、碰撞檢測配置 等。

📌 用途

  • 列出 RViz 內 MoveIt! 運動規劃的所有設定選項
  • 幫助開發者了解哪些參數可以調整,如:
    • 更新頻率
    • 計算精度
    • 視覺化設定

📌 如何查看參數描述?

bash
rostopic echo /rviz_*/motionplanning_planning_scene_monitor/parameter_descriptions

🔹 範例輸出

yaml
{ "name": "scene_update_frequency", "description": "The frequency at which the planning scene updates.", "type": "double", "default": 10.0 }

這表示 場景更新頻率預設為 10Hz,可以透過 /rviz_*/motionplanning_planning_scene_monitor/parameter_updates 來修改。


2️⃣ /rviz_*/motionplanning_planning_scene_monitor/parameter_updates

📌 作用

  • RViz 內的運動規劃場景參數變更 時,這個話題會發布 更新訊息
  • 例如:
    • 修改規劃場景的更新頻率
    • 開啟或關閉障礙物偵測
    • 變更規劃算法設定

📌 用途

  • 監測 RViz 內 MoveIt! 設定的變更,確保參數更新正確。
  • /motionplanning_planning_scene_monitor/parameter_descriptions 搭配使用

📌 如何訂閱這個話題?

bash
rostopic echo /rviz_*/motionplanning_planning_scene_monitor/parameter_updates

🔹 範例輸出

yaml
{ "name": "scene_update_frequency", "value": 5.0 }

這表示 場景更新頻率已從 10Hz 降到 5Hz

📌 如何手動修改參數?

bash
rosparam set /rviz_*/motionplanning_planning_scene_monitor/scene_update_frequency 5.0

3️⃣ /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/feedback

📌 作用

  • 負責接收 RViz 內互動標記(Interactive Marker)的回饋資訊
  • 這些 互動標記 允許使用者在 RViz 內 拖動機械臂 來調整終端執行器(End Effector)的位置。

📌 用途

  • 當使用者拖動 RViz 內的機械臂標記時,MoveIt! 會接收到這個話題的訊息
  • 適用於交互式測試機械臂運動規劃

📌 如何監測回饋資訊?

bash
rostopic echo /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/feedback

🔹 範例輸出

yaml
{ "marker_name": "end_effector_marker", "event_type": "pose_changed", "new_pose": {x: 0.5, y: 0.3, z: 0.8} }

這表示 使用者在 RViz 內移動了機械臂的終端執行器,目標點改變為 (0.5, 0.3, 0.8)

📌 如何手動控制機械臂?

bash
rostopic pub /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update ...

這樣可以模擬 RViz 內的拖動操作


4️⃣ /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update

📌 作用

  • 當使用者拖動機械臂時,這個話題會發布新的目標位置資訊
  • MoveIt! 會根據這個話題的數據 重新計算運動規劃路徑

📌 用途

  • 監測使用者在 RViz 內手動控制機械臂時的即時變化
  • 讓 MoveIt! 根據新的終端位置進行路徑計算

📌 如何訂閱這個話題?

bash
rostopic echo /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update

🔹 範例輸出

yaml
{ "marker_name": "arm_marker", "new_pose": {x: 0.2, y: 0.1, z: 0.5} }

這表示 機械臂的終端執行器目標位置變更

📌 如何測試 MoveIt! 規劃?

bash
rosrun moveit_commander moveit_commander_cmdline.py >>> arm.set_pose_target([0.2, 0.1, 0.5]) >>> arm.go()

這樣就能讓機械臂按照 RViz 內的拖動位置進行運動規劃。


5️⃣ /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update_full

📌 作用

  • /update 相似,但包含完整的規劃場景資訊
  • 當規劃環境(Planning Scene)發生變更時,這個話題會發送更新

📌 用途

  • 確保 RViz 內的交互式操作能夠正確反映在整個運動規劃環境中
  • 包含機械臂當前的完整狀態(如關節角度、碰撞物件等)

📌 如何監測完整的更新?

bash
rostopic echo /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update_full

🔹 範例輸出

yaml
{ "robot_state": {joint_1: 0.5, joint_2: -0.3, joint_3: 1.2}, "planning_scene": {...}, "collision_objects": ["table", "box"] }

這表示:

  • 機械臂關節狀態已更新
  • 運動規劃場景的環境物件(如桌子和箱子)也被更新

📌 如何讓 MoveIt! 重新規劃?

bash
rosservice call /move_group/plan ...

這樣 MoveIt! 會根據新的環境 重新規劃運動路徑


📌 總結

話題名稱功能用途
/rviz_*_motionplanning_planning_scene_monitor/parameter_descriptions列出 MoveIt! 規劃場景的參數用於開發者查詢
/rviz_*_motionplanning_planning_scene_monitor/parameter_updates當 MoveIt! 規劃場景的參數變更時發布更新監測 & 記錄參數變更
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/feedback當使用者在 RViz 內拖動機械臂時回饋資訊監測 RViz 內的手動拖動操作
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update當 RViz 內的機械臂終端變更時,通知 MoveIt!用於即時運動規劃
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update_full當場景更新時,發布完整的環境與機械臂狀態確保整個運動規劃環境同步更新

🚀 這樣你就可以理解 RViz 內的 MoveIt! 

規劃場景與互動標記(Interactive Marker)如何運作了! 🎯


沒有留言: