本文整理汇总了Java中org.ros.exception.RosRuntimeException类的典型用法代码示例。如果您正苦于以下问题:Java RosRuntimeException类的具体用法?Java RosRuntimeException怎么用?Java RosRuntimeException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RosRuntimeException类属于org.ros.exception包,在下文中一共展示了RosRuntimeException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startMasterBlocking
import org.ros.exception.RosRuntimeException; //导入依赖的package包/类
/**
* Private blocking method to start a Ros Master.
* @param isPrivate
*/
private void startMasterBlocking(boolean isPrivate) {
if (isPrivate) {
rosCore = RosCore.newPrivate();
} else if (rosHostname != null) {
rosCore = RosCore.newPublic(rosHostname, 11311);
} else {
rosCore = RosCore.newPublic(11311);
}
rosCore.start();
try {
rosCore.awaitStart();
} catch (Exception e) {
throw new RosRuntimeException(e);
}
masterUri = rosCore.getUri();
}
示例2: surfaceCreated
import org.ros.exception.RosRuntimeException; //导入依赖的package包/类
@Override
public void surfaceCreated(SurfaceHolder holder) {
try {
if (camera != null) {
camera.setPreviewDisplay(holder);
}
} catch (IOException e) {
throw new RosRuntimeException(e);
}
}
示例3: setCamera
import org.ros.exception.RosRuntimeException; //导入依赖的package包/类
public void setCamera(Camera camera) {
Preconditions.checkNotNull(camera);
this.camera = camera;
setupCameraParameters();
setupBufferingPreviewCallback();
camera.startPreview();
try {
// This may have no effect if the SurfaceHolder is not yet created.
camera.setPreviewDisplay(surfaceHolder);
} catch (IOException e) {
throw new RosRuntimeException(e);
}
}
示例4: onStart
import org.ros.exception.RosRuntimeException; //导入依赖的package包/类
@Override
public void onStart(ConnectedNode connectedNode) {
super.onStart(connectedNode);
try {
serviceClient = connectedNode.newServiceClient("faster_rcnn", tms_ss_rcnn.obj_detection._TYPE);
} catch (ServiceNotFoundException e) {
throw new RosRuntimeException(e);
}
mConnectedNode = connectedNode;
}
示例5: getMasterUri
import org.ros.exception.RosRuntimeException; //导入依赖的package包/类
private URI getMasterUri() {
URI uri = NodeConfiguration.DEFAULT_MASTER_URI;
try {
if (this.specialRemappings.containsKey("__master")) {
uri = new URI(this.specialRemappings.get("__master"));
} else if (this.environment.containsKey("ROS_MASTER_URI")) {
uri = new URI(this.environment.get("ROS_MASTER_URI"));
}
return uri;
} catch (URISyntaxException var3) {
throw new RosRuntimeException("Invalid master URI: " + uri, var3);
}
}