当前位置: 首页>>代码示例>>Java>>正文


Java RosRuntimeException类代码示例

本文整理汇总了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();
}
 
开发者ID:frankjoshua,项目名称:AndroidRosJava,代码行数:21,代码来源:NodeMainExecutorService.java

示例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);
  }
}
 
开发者ID:frankjoshua,项目名称:AndroidRosJava,代码行数:11,代码来源:CameraPreviewView.java

示例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);
  }
}
 
开发者ID:frankjoshua,项目名称:AndroidRosJava,代码行数:14,代码来源:CameraPreviewView.java

示例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;
}
 
开发者ID:kazuto1011,项目名称:ros-tms-perception,代码行数:14,代码来源:ObjectDetectionClient.java

示例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);
  }
}
 
开发者ID:WPIRoboticsProjects,项目名称:GRIP,代码行数:16,代码来源:ROSLoader.java


注:本文中的org.ros.exception.RosRuntimeException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。