本文整理汇总了Java中org.ros.namespace.GraphName.of方法的典型用法代码示例。如果您正苦于以下问题:Java GraphName.of方法的具体用法?Java GraphName.of怎么用?Java GraphName.of使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ros.namespace.GraphName
的用法示例。
在下文中一共展示了GraphName.of方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateVertexBuffer
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
private void updateVertexBuffer(nav_msgs.Path path) {
ByteBuffer goalVertexByteBuffer =
ByteBuffer.allocateDirect(path.getPoses().size() * 3 * Float.SIZE / 8);
goalVertexByteBuffer.order(ByteOrder.nativeOrder());
vertexBuffer = goalVertexByteBuffer.asFloatBuffer();
if (path.getPoses().size() > 0) {
frame = GraphName.of(path.getPoses().get(0).getHeader().getFrameId());
// Path poses are densely packed and will make the path look like a solid
// line even if it is drawn as points. Skipping poses provides the visual
// point separation were looking for.
int i = 0;
for (PoseStamped pose : path.getPoses()) {
// TODO(damonkohler): Choose the separation between points as a pixel
// value. This will require inspecting the zoom level from the camera.
if (i % 15 == 0) {
vertexBuffer.put((float) pose.getPose().getPosition().getX());
vertexBuffer.put((float) pose.getPose().getPosition().getY());
vertexBuffer.put((float) pose.getPose().getPosition().getZ());
}
i++;
}
}
vertexBuffer.position(0);
}
示例2: update
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
void update(nav_msgs.OccupancyGrid message) {
ChannelBuffer buffer = message.getData();
Bitmap bitmap =
BitmapFactory.decodeByteArray(buffer.array(), buffer.arrayOffset(), buffer.readableBytes());
int stride = bitmap.getWidth();
int height = bitmap.getHeight();
Preconditions.checkArgument(stride <= 1024);
Preconditions.checkArgument(height <= 1024);
int[] pixels = new int[stride * height];
bitmap.getPixels(pixels, 0, stride, 0, 0, stride, height);
for (int i = 0; i < pixels.length; i++) {
// Pixels are ARGB packed ints.
if (pixels[i] == 0xffffffff) {
pixels[i] = COLOR_UNKNOWN;
} else if (pixels[i] == 0xff000000) {
pixels[i] = COLOR_FREE;
} else {
pixels[i] = COLOR_OCCUPIED;
}
}
float resolution = message.getInfo().getResolution();
Transform origin = Transform.fromPoseMessage(message.getInfo().getOrigin());
textureBitmap.updateFromPixelArray(pixels, stride, resolution, origin, COLOR_UNKNOWN);
frame = GraphName.of(message.getHeader().getFrameId());
ready = true;
}
示例3: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
/**
* Required by rosjava's AbstractNodeMain class
*/
@Override
public GraphName getDefaultNodeName()
/*************************************************************************/
{
return GraphName.of("ShieldTeleop/JoystickNode");
}
示例4: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("dl4j_rosjava/fetch_controller");
}
示例5: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("utmg_android");
}
示例6: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of(NODE_NAME);
}
示例7: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("guest_science_manager");
}
示例8: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("simple_node");
}
示例9: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("gs_demo_node");
}
示例10: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("perch_cam");
}
示例11: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("guest_science_app");
}
示例12: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("rgb_led");
}
示例13: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("/system_wol");
}
示例14: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
/**
* @return The default node name for the RobotController
*/
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("android/robot_controller");
}
示例15: getDefaultNodeName
import org.ros.namespace.GraphName; //导入方法依赖的package包/类
@Override
public GraphName getDefaultNodeName() {
return GraphName.of("android_gingerbread/ros_text_view");
}