- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.graphicsDescription.yoGraphics.YoGraphicPolygon.<init>()
方法的一些代码示例,展示了YoGraphicPolygon.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoGraphicPolygon.<init>()
方法的具体详情如下:
包路径:us.ihmc.graphicsDescription.yoGraphics.YoGraphicPolygon
类名称:YoGraphicPolygon
方法名:<init>
暂无
代码示例来源:origin: us.ihmc/ihmc-graphics-description
static YoGraphicPolygon createAsRemoteYoGraphic(String name, YoVariable<?>[] yoVariables, double[] constants, AppearanceDefinition appearance)
{
return new YoGraphicPolygon(name, yoVariables, constants, appearance);
}
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
private void createCandidateFootstep(String name, int index, YoVariableRegistry registry, YoGraphicsListRegistry yoGraphicsListRegistry)
{
YoFramePoseUsingYawPitchRoll footstepYoFramePose = new YoFramePoseUsingYawPitchRoll(name + index + "FramePose", ReferenceFrame.getWorldFrame(), registry);
footstepYoFramePose.setToNaN();
YoGraphicPolygon footstepYoGraphicPolygon = new YoGraphicPolygon(name + index + "YoGraphicPolygon", footstepYoFramePose,
defaultFootPolygon.getNumberOfVertices(), registry, 1.0, YoAppearance.Red());
footstepYoGraphicPolygon.updateConvexPolygon2d(defaultFootPolygon);
candidateFootstepPolygons.put(index, footstepYoGraphicPolygon);
yoGraphicsListRegistry.registerYoGraphic(getClass().getSimpleName(), footstepYoGraphicPolygon);
}
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
private YoGraphicPolygon createStaticFootstep(String name, FramePose3D framePose, AppearanceDefinition appearance, YoVariableRegistry registry,
YoGraphicsListRegistry yoGraphicsListRegistry)
{
YoFramePoseUsingYawPitchRoll footstepYoFramePose = new YoFramePoseUsingYawPitchRoll(name + "FramePose", ReferenceFrame.getWorldFrame(), registry);
footstepYoFramePose.set(framePose);
YoGraphicPolygon footstepYoGraphicPolygon = new YoGraphicPolygon(name + "YoGraphicPolygon", footstepYoFramePose, defaultFootPolygon.getNumberOfVertices(),
registry, 1.0, appearance);
footstepYoGraphicPolygon.updateConvexPolygon2d(defaultFootPolygon);
yoGraphicsListRegistry.registerYoGraphic(getClass().getSimpleName(), footstepYoGraphicPolygon);
return footstepYoGraphicPolygon;
}
代码示例来源:origin: us.ihmc/CommonWalkingControlModules
public FootstepVisualizer(String name, String graphicListName, RobotSide robotSide, ContactablePlaneBody contactableFoot, AppearanceDefinition footstepColor,
YoGraphicsListRegistry yoGraphicsListRegistry, YoVariableRegistry registry)
{
this.robotSide = robotSide;
yoFootstepPose = new YoFramePose(name + "Pose", worldFrame, registry);
yoFoothold = new YoFrameConvexPolygon2d(name + "Foothold", "", worldFrame, maxNumberOfContactPoints, registry);
double coordinateSystemSize = 0.2;
double footholdScale = 1.0;
poseViz = new YoGraphicCoordinateSystem(name + "Pose", yoFootstepPose, coordinateSystemSize, footstepColor);
footholdViz = new YoGraphicPolygon(name + "Foothold", yoFoothold, yoFootstepPose, footholdScale, footstepColor);
yoGraphicsListRegistry.registerYoGraphic(graphicListName, poseViz);
yoGraphicsListRegistry.registerYoGraphic(graphicListName, footholdViz);
List<FramePoint2d> contactPoints2d = contactableFoot.getContactPoints2d();
for (int i = 0; i < contactPoints2d.size(); i++)
defaultContactPointsInSoleFrame.add(contactPoints2d.get(i).getPointCopy());
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
@Override
public YoGraphicPolygon duplicate(YoVariableRegistry newRegistry)
{
if (isUsingYawPitchRoll())
return new YoGraphicPolygon(getName(), yoFrameConvexPolygon2d.duplicate(newRegistry), yoFramePoint.duplicate(newRegistry),
yoFrameYawPitchRoll.duplicate(newRegistry), scale, height, appearance);
else
return new YoGraphicPolygon(getName(), yoFrameConvexPolygon2d.duplicate(newRegistry), yoFramePoint.duplicate(newRegistry),
yoFrameQuaternion.duplicate(newRegistry), scale, height, appearance);
}
代码示例来源:origin: us.ihmc/IHMCFootstepPlanning
rightRejectedFootstep.setConvexPolygon2d(rightFootInSoleFrame);
leftFootstepStartViz = new YoGraphicPolygon("leftFootstepStartViz", leftFootstepStart, "leftFootstepStartPose", "", registry, 1.0, YoAppearance.Gold());
rightFootstepStartViz = new YoGraphicPolygon("rightFootstepStartViz", rightFootstepStart, "rightFootstepStartPose", "", registry, 1.0, YoAppearance.Gold());
leftFootstepGoalViz = new YoGraphicPolygon("leftFootstepGoalViz", leftFootstepGoal, "leftFootstepGoalPose", "", registry, 1.0, YoAppearance.Chocolate());
rightFootstepGoalViz = new YoGraphicPolygon("rightFootstepGoalViz", rightFootstepGoal, "rightFootstepGoalPose", "", registry, 1.0, YoAppearance.Chocolate());
leftFootstepToExpandViz = new YoGraphicPolygon("leftFootstepToExpandViz", leftFootstepUnderConsideration, "leftFootstepToExpandPose", "", registry, 1.0, YoAppearance.Yellow());
rightFootstepToExpandViz = new YoGraphicPolygon("rightFootstepToExpandViz", rightFootstepUnderConsideration, "rightFootstepToExpandPose", "", registry, 1.0, YoAppearance.Yellow());
leftAcceptedFootstepViz = new YoGraphicPolygon("leftAcceptedFootstepViz", leftAcceptedFootstep, "leftAcceptedFootstepPose", "", registry, 1.0, YoAppearance.Green());
rightAcceptedFootstepViz = new YoGraphicPolygon("rightAcceptedFootstepViz", rightAcceptedFootstep, "rightAcceptedFootstepPose", "", registry, 1.0, YoAppearance.DarkGreen());
leftRejectedFootstepViz = new YoGraphicPolygon("leftRejectedFootstepViz", leftRejectedFootstep, "leftRejectedFootstepPose", "", registry, 1.0, YoAppearance.Red());
rightRejectedFootstepViz = new YoGraphicPolygon("rightRejectedFootstepViz", rightRejectedFootstep, "rightRejectedFootstepPose", "", registry, 1.0, YoAppearance.DarkRed());
leftFootstepSolvedPlan.setConvexPolygon2d(leftFootInSoleFrame);
YoGraphicPolygon leftFootstepSolvedPlanViz = new YoGraphicPolygon("leftFootstepSolvedPlanViz" + i, leftFootstepSolvedPlan, "leftFootstepSolvedPlan" + i, "", registry, 1.0, YoAppearance.Purple());
graphicsListRegistry.registerYoGraphic("FootstepPlanner", leftFootstepSolvedPlanViz);
rightFootstepSolvedPlan.setConvexPolygon2d(rightFootInSoleFrame);
YoGraphicPolygon rightFootstepSolvedPlanViz = new YoGraphicPolygon("rightFootstepSolvedPlanViz" + i, rightFootstepSolvedPlan, "rightFootstepSolvedPlan" + i, "", registry, 1.0, YoAppearance.Purple());
graphicsListRegistry.registerYoGraphic("FootstepPlanner", rightFootstepSolvedPlanViz);
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
public Controller(YoGraphicsListRegistry graphicsListRegistry)
{
for (int i = 0; i < numberOfPoints; i++)
{
YoFramePoint3D yoPoint = new YoFramePoint3D("Position" + i, ReferenceFrame.getWorldFrame(), registry);
YoGraphicPosition position = new YoGraphicPosition("Position" + i, yoPoint, 0.02, YoAppearance.Blue());
points.add(yoPoint);
graphicsListRegistry.registerYoGraphic("BodyPath", position);
}
YoFrameConvexPolygon2D yoDefaultFootPolygon = new YoFrameConvexPolygon2D("DefaultFootPolygon", ReferenceFrame.getWorldFrame(), 4, registry);
yoDefaultFootPolygon.set(PlannerTools.createDefaultFootPolygon());
for (RobotSide side : RobotSide.values)
{
AppearanceDefinition appearance = side == RobotSide.RIGHT ? YoAppearance.Green() : YoAppearance.Red();
ArrayList<YoFramePoseUsingYawPitchRoll> poses = new ArrayList<>();
for (int i = 0; i < stepsPerSide; i++)
{
YoFramePoseUsingYawPitchRoll yoFootstepPose = new YoFramePoseUsingYawPitchRoll("footPose" + side.getCamelCaseName() + i, ReferenceFrame.getWorldFrame(), registry);
YoGraphicPolygon footstepViz = new YoGraphicPolygon("footstep" + side.getCamelCaseName() + i, yoDefaultFootPolygon, yoFootstepPose, 1.0,
appearance);
poses.add(yoFootstepPose);
yoFootstepPose.setToNaN();
graphicsListRegistry.registerYoGraphic("viz", footstepViz);
}
yoSteps.put(side, poses);
}
planner.setTimeout(1.0);
}
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
public PolygonSnapperVisualizer(ConvexPolygon2D snappingPolygonShape)
{
Robot robot = new Robot("Robot");
scs = new SimulationConstructionSet(robot);
scs.setDT(0.1, 1);
polygonToSnap = new YoFrameConvexPolygon2D("polygonToSnap", ReferenceFrame.getWorldFrame(), 4, registry);
snappedPolygon = new YoFrameConvexPolygon2D("snappedPolygon", ReferenceFrame.getWorldFrame(), 4, registry);
polygonToSnap.set(snappingPolygonShape);
snappedPolygon.set(snappingPolygonShape);
polygonToSnapPose = new YoFramePoseUsingYawPitchRoll("polygonToSnapPose", ReferenceFrame.getWorldFrame(), registry);
snappedPolygonPose = new YoFramePoseUsingYawPitchRoll("snappedPolygonPose", ReferenceFrame.getWorldFrame(), registry);
polygonToSnapPose.setToNaN();
snappedPolygonPose.setToNaN();
polygonToSnapViz = new YoGraphicPolygon("polygonToSnapViz", polygonToSnap, polygonToSnapPose, 1.0, YoAppearance.Green());
snappedPolygonViz = new YoGraphicPolygon("snappedPolygonViz", polygonToSnap, snappedPolygonPose, 1.0, YoAppearance.Red());
polygonToSnapViz.update();
snappedPolygonViz.update();
scs.addYoGraphic(polygonToSnapViz);
scs.addYoGraphic(snappedPolygonViz);
scs.addYoVariableRegistry(registry);
scs.setGroundVisible(false);
scs.startOnAThread();
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
bubble.setTransparency(0.5);
collisionSphere = new YoGraphicEllipsoid("CollisionSphere", solePose.getPosition(), solePose.getOrientation(), bubble, new Vector3D());
stanceFootGraphic = new YoGraphicPolygon("StanceFootGraphic", footPolygon.getNumberOfVertices(), registry, true, 1.0, YoAppearance.Blue());
swingStartGraphic = new YoGraphicPolygon("SwingStartGraphic", footPolygon.getNumberOfVertices(), registry, true, 1.0, YoAppearance.Green());
swingEndGraphic = new YoGraphicPolygon("SwingEndGraphic", footPolygon.getNumberOfVertices(), registry, true, 1.0, YoAppearance.Yellow());
intersectionMap = new HashMap<SwingOverPlanarRegionsTrajectoryCollisionType, YoGraphicPosition>();
for (SwingOverPlanarRegionsTrajectoryCollisionType swingOverPlanarRegionsTrajectoryCollisionType : SwingOverPlanarRegionsTrajectoryCollisionType.values())
代码示例来源:origin: us.ihmc/IHMCHumanoidRobotics
public SingleFootstepVisualizer(RobotSide robotSide, int maxContactPoints, YoVariableRegistry registry, YoGraphicsListRegistry yoGraphicsListRegistry)
{
Integer index = indices.get(robotSide);
String namePrefix = robotSide.getLowerCaseName() + "Foot" + index;
YoGraphicsList yoGraphicsList = new YoGraphicsList(namePrefix);
this.robotSide = robotSide;
ArrayList<Point2d> polyPoints = new ArrayList<Point2d>();
yoContactPoints = new YoFramePoint[maxContactPoints];
for (int i = 0; i < maxContactPoints; i++)
{
yoContactPoints[i] = new YoFramePoint(namePrefix + "ContactPoint" + i, ReferenceFrame.getWorldFrame(), registry);
yoContactPoints[i].set(0.0, 0.0, -1.0);
YoGraphicPosition baseControlPointViz = new YoGraphicPosition(namePrefix + "Point" + i, yoContactPoints[i], 0.01, YoAppearance.Blue());
yoGraphicsList.add(baseControlPointViz);
polyPoints.add(new Point2d());
}
footPolygon = new YoFrameConvexPolygon2d(namePrefix + "yoPolygon", "", ReferenceFrame.getWorldFrame(), maxContactPoints, registry);
footPolygon.setConvexPolygon2d(new ConvexPolygon2d(polyPoints));
soleFramePose = new YoFramePose(namePrefix + "polygonPose", "", ReferenceFrame.getWorldFrame(), registry);
soleFramePose.setXYZ(0.0, 0.0, -1.0);
footPolygonViz = new YoGraphicPolygon(namePrefix + "graphicPolygon", footPolygon, soleFramePose, 1.0, footPolygonAppearances.get(robotSide));
yoGraphicsList.add(footPolygonViz);
if (yoGraphicsListRegistry != null)
{
yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
yoGraphicsListRegistry.registerGraphicsUpdatableToUpdateInAPlaybackListener(footPolygonViz);
}
index++;
indices.set(robotSide, index);
}
代码示例来源:origin: us.ihmc/ihmc-humanoid-robotics
public SingleFootstepVisualizer(RobotSide robotSide, int maxContactPoints, YoVariableRegistry registry, YoGraphicsListRegistry yoGraphicsListRegistry)
{
Integer index = indices.get(robotSide);
String namePrefix = robotSide.getLowerCaseName() + "Foot" + index;
YoGraphicsList yoGraphicsList = new YoGraphicsList(namePrefix);
this.robotSide = robotSide;
ArrayList<Point2D> polyPoints = new ArrayList<Point2D>();
yoContactPoints = new YoFramePoint3D[maxContactPoints];
for (int i = 0; i < maxContactPoints; i++)
{
yoContactPoints[i] = new YoFramePoint3D(namePrefix + "ContactPoint" + i, ReferenceFrame.getWorldFrame(), registry);
yoContactPoints[i].set(0.0, 0.0, -1.0);
YoGraphicPosition baseControlPointViz = new YoGraphicPosition(namePrefix + "Point" + i, yoContactPoints[i], 0.01, YoAppearance.Blue());
yoGraphicsList.add(baseControlPointViz);
polyPoints.add(new Point2D());
}
footPolygon = new YoFrameConvexPolygon2D(namePrefix + "yoPolygon", "", ReferenceFrame.getWorldFrame(), maxContactPoints, registry);
footPolygon.set(new ConvexPolygon2D(Vertex2DSupplier.asVertex2DSupplier(polyPoints)));
soleFramePose = new YoFramePoseUsingYawPitchRoll(namePrefix + "polygonPose", "", ReferenceFrame.getWorldFrame(), registry);
soleFramePose.setXYZ(0.0, 0.0, -1.0);
footPolygonViz = new YoGraphicPolygon(namePrefix + "graphicPolygon", footPolygon, soleFramePose, 1.0, footPolygonAppearances.get(robotSide));
yoGraphicsList.add(footPolygonViz);
if (yoGraphicsListRegistry != null)
{
yoGraphicsListRegistry.registerYoGraphicsList(yoGraphicsList);
yoGraphicsListRegistry.registerGraphicsUpdatableToUpdateInAPlaybackListener(footPolygonViz);
}
index++;
indices.set(robotSide, index);
}
代码示例来源:origin: us.ihmc/IHMCGraphicsDescription
referenceFrame);
return new YoGraphicPolygon(name, convexPolygon2d, framePoint, frameOrientation, consts[0], appearance);
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
yoPose.setToNaN();
solePosesForVisualization.get(robotSide).add(yoPose);
YoGraphicPolygon footstepViz = new YoGraphicPolygon("footstep" + sideName + i, defaultPolygon, yoPose, 1.0, appearance);
graphicsListRegistry.registerYoGraphic("viz", footstepViz);
YoGraphicPolygon stanceViz = new YoGraphicPolygon("startFootPose", defaultPolygon, startStep, 1.0, YoAppearance.Black());
graphicsListRegistry.registerYoGraphic("viz", stanceViz);
step.setToNaN();
stepPosesTaken.add(step);
YoGraphicPolygon polygon = new YoGraphicPolygon("step" + i, defaultPolygon, step, 1.0, YoAppearance.Gray());
graphicsListRegistry.registerYoGraphic("viz", polygon);
visiblePolygons.add(polygon);
visiblePolygonPoses.add(pose);
YoGraphicPolygon visualization = new YoGraphicPolygon("Polygon" + i, polygon, pose.getPosition(), pose.getOrientation(), 1.0, 0.02,
new YoAppearanceRGBColor(Color.BLUE, 0.8));
polygonVisualizations.add(visualization);
代码示例来源:origin: us.ihmc/ihmc-path-planning-test
visiblePolygons.add(polygon);
visiblePolygonPoses.add(pose);
YoGraphicPolygon visualization = new YoGraphicPolygon("Polygon" + i, polygon, pose.getPosition(), pose.getOrientation(), 1.0, 0.02,
new YoAppearanceRGBColor(Color.BLUE, 0.8));
polygonVisualizations.add(visualization);
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
floorGraphic = new YoGraphicPolygon("floorGraphic", yoFrameConvexPolygon2d, yoPlanePose, 3.0, YoAppearance.DimGrey());
graphicsRegistry.registerYoGraphic("ground", floorGraphic);
代码示例来源:origin: us.ihmc/ihmc-footstep-planning-test
YoGraphicPolygon footstepViz = new YoGraphicPolygon("footstep" + i, yoDefaultFootPolygon, yoFootstepPose, 1.0, appearance);
vizGraphicsListRegistry.registerYoGraphic("viz", footstepViz);
YoGraphicPolygon fullFootstepViz = new YoGraphicPolygon("fullFootstep" + i, yoDefaultFootPolygon, yoFootstepPose, 1.0, YoAppearance.Glass(0.7));
vizGraphicsListRegistry.registerYoGraphic("viz", fullFootstepViz);
YoFrameConvexPolygon2D yoFoothold = new YoFrameConvexPolygon2D("Foothold" + i, worldFrame, 4, vizRegistry);
yoFoothold.set(foothold);
YoGraphicPolygon footstepViz = new YoGraphicPolygon("footstep" + i, yoFoothold, yoFootstepPose, 1.0, appearance);
vizGraphicsListRegistry.registerYoGraphic("viz", footstepViz);
代码示例来源:origin: us.ihmc/simulation-construction-set-test
yoPolygon.set(polygon);
YoFramePoseUsingYawPitchRoll yoPolyOrigin = new YoFramePoseUsingYawPitchRoll("PolyOrigin", worldFrame, registry);
YoGraphicPolygon yoGraphicPolygon = new YoGraphicPolygon("Polygon", yoPolygon, yoPolyOrigin, 3.0, appearance);
yoPolyOrigin.setXYZ(0.1, 0.2, 1.0);
yoPolyOrigin.setYawPitchRoll(-0.1, -0.4, -0.3);
final YoFrameYawPitchRoll yoFramePolygonOrientation = new YoFrameYawPitchRoll("yoPolygonOrientation", "", worldFrame, registry);
yoFramePolygonOrientation.setYawPitchRoll(1.2, 0.1, 0.4);
final YoGraphicPolygon yoGraphicYoFramePolygon = new YoGraphicPolygon("YoFramePolygon", yoFramePolygon,
yoFramePolygonPosition, yoFramePolygonOrientation, 1.0, YoAppearance.DarkBlue());
我想了解 Ruby 方法 methods() 是如何工作的。 我尝试使用“ruby 方法”在 Google 上搜索,但这不是我需要的。 我也看过 ruby-doc.org,但我没有找到这种方法。
Test 方法 对指定的字符串执行一个正则表达式搜索,并返回一个 Boolean 值指示是否找到匹配的模式。 object.Test(string) 参数 object 必选项。总是一个
Replace 方法 替换在正则表达式查找中找到的文本。 object.Replace(string1, string2) 参数 object 必选项。总是一个 RegExp 对象的名称。
Raise 方法 生成运行时错误 object.Raise(number, source, description, helpfile, helpcontext) 参数 object 应为
Execute 方法 对指定的字符串执行正则表达式搜索。 object.Execute(string) 参数 object 必选项。总是一个 RegExp 对象的名称。 string
Clear 方法 清除 Err 对象的所有属性设置。 object.Clear object 应为 Err 对象的名称。 说明 在错误处理后,使用 Clear 显式地清除 Err 对象。此
CopyFile 方法 将一个或多个文件从某位置复制到另一位置。 object.CopyFile source, destination[, overwrite] 参数 object 必选
Copy 方法 将指定的文件或文件夹从某位置复制到另一位置。 object.Copy destination[, overwrite] 参数 object 必选项。应为 File 或 F
Close 方法 关闭打开的 TextStream 文件。 object.Close object 应为 TextStream 对象的名称。 说明 下面例子举例说明如何使用 Close 方
BuildPath 方法 向现有路径后添加名称。 object.BuildPath(path, name) 参数 object 必选项。应为 FileSystemObject 对象的名称
GetFolder 方法 返回与指定的路径中某文件夹相应的 Folder 对象。 object.GetFolder(folderspec) 参数 object 必选项。应为 FileSy
GetFileName 方法 返回指定路径(不是指定驱动器路径部分)的最后一个文件或文件夹。 object.GetFileName(pathspec) 参数 object 必选项。应为
GetFile 方法 返回与指定路径中某文件相应的 File 对象。 object.GetFile(filespec) 参数 object 必选项。应为 FileSystemObject
GetExtensionName 方法 返回字符串,该字符串包含路径最后一个组成部分的扩展名。 object.GetExtensionName(path) 参数 object 必选项。应
GetDriveName 方法 返回包含指定路径中驱动器名的字符串。 object.GetDriveName(path) 参数 object 必选项。应为 FileSystemObjec
GetDrive 方法 返回与指定的路径中驱动器相对应的 Drive 对象。 object.GetDrive drivespec 参数 object 必选项。应为 FileSystemO
GetBaseName 方法 返回字符串,其中包含文件的基本名 (不带扩展名), 或者提供的路径说明中的文件夹。 object.GetBaseName(path) 参数 object 必
GetAbsolutePathName 方法 从提供的指定路径中返回完整且含义明确的路径。 object.GetAbsolutePathName(pathspec) 参数 object
FolderExists 方法 如果指定的文件夹存在,则返回 True;否则返回 False。 object.FolderExists(folderspec) 参数 object 必选项
FileExists 方法 如果指定的文件存在返回 True;否则返回 False。 object.FileExists(filespec) 参数 object 必选项。应为 FileS
我是一名优秀的程序员,十分优秀!