/** * @throws ClientException * @brief Get the 3D pose of a named simulation object */ public PlayerPose3d retrievePose3d(ByteArrayOutputStream name) throws ClientException { PlayerSimulationPose3dReq request = new PlayerSimulationPose3dReq(); PlayerSimulationPose3dReq configure = new PlayerSimulationPose3dReq(); request.setName(name); configure = (PlayerSimulationPose3dReq) super.getClient().request(this, PLAYER_SIMULATION_REQ_GET_POSE3D, request); PlayerPose3d response = new PlayerPose3d(); if (configure != null) { response.setPx(configure.getPose().getPx()); response.setPy(configure.getPose().getPy()); response.setPz(configure.getPose().getPz()); response.setProll(configure.getPose().getProll()); response.setPpitch(configure.getPose().getPpitch()); response.setPyaw(configure.getPose().getPyaw()); } return response; }
/** * @throws ClientException * @brief Set the 3D pose of a named simulation object */ public PlayerSimulationPose3dReq sendPose3d( ByteArrayOutputStream name, double goalX, double goalY, double goalZ, double goalRoll, double goalPitch, double goalYaw) throws ClientException { PlayerSimulationPose3dReq request = new PlayerSimulationPose3dReq(); PlayerPose3d pose = new PlayerPose3d(); pose.setPx(goalX); pose.setPy(goalY); pose.setPz(goalZ); pose.setProll(goalRoll); pose.setPpitch(goalPitch); pose.setPyaw(goalYaw); request.setPose(pose); request.setName(name); return (PlayerSimulationPose3dReq) super.getClient().request(this, PLAYER_SIMULATION_REQ_SET_POSE3D, request); }