💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
使机械臂在笛卡尔空间运动 ```python #!/usr/bin/env python import roslib # roslib.load_manifest('actionlib_test') import rospy import actionlib from gauss_msgs.msg import RobotMoveAction from gauss_msgs.msg import RobotMoveGoal from gauss_msgs.msg import RobotMoveResult from gauss_commander.command_type import CommandType as MoveCommandType if __name__ == '__main__': rospy.init_node('robot_action_client') client = actionlib.SimpleActionClient('/gauss/commander/robot_action', RobotMoveAction) if not client.wait_for_server(rospy.Duration(5.0)): exit goal = RobotMoveGoal() goal.cmd.cmd_type = MoveCommandType.POSE goal.cmd.position.x = 0.3005 goal.cmd.position.y = 0.0004 goal.cmd.position.z = 0.3383 goal.cmd.rpy.roll = 0 goal.cmd.rpy.pitch = 0 goal.cmd.rpy.yaw = 0 client.send_goal(goal) client.wait_for_result(rospy.Duration.from_sec(10.0)) result = client.get_result() ```