## 運動規劃
接口文件: gauss/gauss_python_api/src/gauss_python_api/gauss_api.py
- 接口: gauss/commander/robot_action
- ROS 接口類型: Action
- 接口內容: RobotMoveAction
move接口可以完成如下的規劃任務:
```
JOINTS = 1
POSE = 2
POSITION = 3
RPY = 4
SHIFT_POSE = 5
# TOOL = 6
# EXECUTE_TRAJ = 7
# POSE_QUAT = 8
# SAVED_POSITION =9
# SAVED_TRAJECTORY = 10
```
注意:Gauss機械臂提供了關節坐標系、直角坐標系的接口,暫未提供笛卡爾路徑規劃接口。
POSE、POSITION、RPY、SHIFT_POSE 等規劃依賴于規劃器和逆解器算法。如有發現規劃失敗,則需要考慮:
1. 是否超出了機械臂的可達范圍
2. 更換OMPL所使用的插件: 配置文件在 ompl_planning.yaml
3. 考慮是否需要更換moveit規劃器:https://moveit.ros.org/documentation/planners/
4. 考慮是否需要更換逆解器:ikfast、trac_ik等
示例代碼參考`gauss/gauss_python_api/src/gauss_python_api/gauss_api.py`文件:
```python
def move_pose(self, x, y, z, roll, pitch, yaw):
goal = RobotMoveGoal()
goal.cmd.cmd_type = MoveCommandType.POSE
goal.cmd.position.x = x
goal.cmd.position.y = y
goal.cmd.position.z = z
goal.cmd.rpy.roll = roll
goal.cmd.rpy.pitch = pitch
goal.cmd.rpy.yaw = yaw
return self.execute_action('gauss/commander/robot_action', RobotMoveAction, goal)
def move_joints(self, joints):
goal = RobotMoveGoal()
goal.cmd.cmd_type = MoveCommandType.JOINTS
goal.cmd.joints = joints
return self.execute_action('gauss/commander/robot_action', RobotMoveAction, goal)
```
參考:
1、 https://bitbucket.org/traclabs/trac_ik/src/HEAD/trac_ik_kinematics_plugin/
- 引言
- 第一章 開關機和網絡配置
- 開關機和網絡連接
- 開機啟動腳本
- 多機通信
- 安裝必要的ROS包
- 第二章 軟件架構
- 第三章 機械臂模型
- 第四章 Python API
- calibrate_auto
- learning_mode
- move_joints
- move_pose
- gripper
- air_vacuum_pump
- electromagnet
- 第五章 ROS接口
- 示教模式
- 關節空間
- 笛卡爾空間
- 運動規劃
- 工具控制
- 自定義消息
- 重新校準
- 自動校準
- 硬件狀態
- 第六章 參數說明
- rpi_ros_processes
- gauss_motors
- robot_command_validation
- stepper_params
- gauss_driver
- end_effectors
- 第七章 launch文件
- rpi_setup
- controllers
- robot_commander
- user_interface
- 第八章 視覺抓取
- 第九章 常見問題