- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.yoVariables.variable.YoFrameQuaternion.<init>()
方法的一些代码示例,展示了YoFrameQuaternion.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameQuaternion.<init>()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoFrameQuaternion
类名称:YoFrameQuaternion
方法名:<init>
[英]Creates a new YoFrameQuaternion using the given YoVariables and sets its reference frame to referenceFrame.
[中]使用给定的YoFrameQuaternion变量创建新的YoFrameQuaternion,并将其参考帧设置为referenceFrame。
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoQuaternionProvider(String namePrefix, ReferenceFrame referenceFrame, YoVariableRegistry registry)
{
orientation = new YoFrameQuaternion(namePrefix + "Orientation", referenceFrame, registry);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoSE3ConfigurationProvider(String name, ReferenceFrame frame, YoVariableRegistry registry)
{
position = new YoFramePoint3D(name, frame, registry);
orientation = new YoFrameQuaternion(name, frame, registry);
}
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Creates a new {@code YoFramePose3D}.
*
* @param namePrefix a unique name string to use as the prefix for child variable names.
* @param nameSuffix a string to use as the suffix for child variable names.
* @param referenceFrame the reference frame for this pose.
* @param registry the registry to register child variables to.
*/
public YoFramePose3D(String namePrefix, String nameSuffix, ReferenceFrame referenceFrame, YoVariableRegistry registry)
{
position = new YoFramePoint3D(namePrefix, nameSuffix, referenceFrame, registry);
orientation = new YoFrameQuaternion(namePrefix, nameSuffix, referenceFrame, registry);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
private FiniteDifferenceAngularVelocityYoFrameVector(String namePrefix, YoFrameQuaternion orientationToDifferentiate, ReferenceFrame referenceFrame, double dt, YoVariableRegistry registry)
{
super(namePrefix, referenceFrame, registry);
this.dt = dt;
orientation = orientationToDifferentiate;
orientationPreviousValue = new YoFrameQuaternion(namePrefix + "_previous", referenceFrame, registry);
hasBeenCalled = new YoBoolean(namePrefix + "HasBeenCalled", registry);
hasBeenCalled.set(false);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public YoGraphicPolygon(String name, YoFrameConvexPolygon2D convexPolygon2d, String namePrefix, String nameSuffix, YoVariableRegistry registry,
boolean useYawPitchRoll, double scale, AppearanceDefinition appearance)
{
this(name, convexPolygon2d, new YoFramePoint3D(namePrefix, nameSuffix, worldFrame, registry),
useYawPitchRoll ? new YoFrameYawPitchRoll(namePrefix, nameSuffix, worldFrame, registry) : null,
useYawPitchRoll ? null : new YoFrameQuaternion(namePrefix, nameSuffix, worldFrame, registry), scale, DEFAULT_HEIGHT, appearance);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public YoGraphicPolygon(String name, YoFrameConvexPolygon2D convexPolygon2d, YoVariableRegistry registry, boolean useYawPitchRoll, double scale,
AppearanceDefinition appearance)
{
this(name, convexPolygon2d, new YoFramePoint3D(name + "Position", worldFrame, registry),
useYawPitchRoll ? new YoFrameYawPitchRoll(name + "Orientation", worldFrame, registry) : null,
useYawPitchRoll ? null : new YoFrameQuaternion(name + "Orientation", worldFrame, registry), scale, DEFAULT_HEIGHT, appearance);
}
代码示例来源:origin: us.ihmc/ihmc-graphics-description
public YoGraphicCoordinateSystem(String namePrefix, String nameSuffix, YoVariableRegistry registry, boolean useYawPitchRoll, double scale,
AppearanceDefinition arrowAppearance)
{
this(namePrefix + nameSuffix, new YoFramePoint3D(namePrefix, nameSuffix, worldFrame, registry),
useYawPitchRoll ? new YoFrameYawPitchRoll(namePrefix, nameSuffix, worldFrame, registry) : null,
useYawPitchRoll ? null : new YoFrameQuaternion(namePrefix, nameSuffix, worldFrame, registry), scale, arrowAppearance);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
private AlphaFilteredYoFrameQuaternion createAlphaFilteredYoFrameQuaternion(DoubleProvider alpha)
{
YoVariableRegistry registry = new YoVariableRegistry("test");
ReferenceFrame referenceFrame = ReferenceFrame.getWorldFrame();
YoFrameQuaternion unfilteredQuaternion = new YoFrameQuaternion("qMeasured", referenceFrame, registry);
AlphaFilteredYoFrameQuaternion q = new AlphaFilteredYoFrameQuaternion("qFiltered", "", unfilteredQuaternion, alpha, registry);
return q;
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public ConstantOrientationTrajectoryGenerator(String namePrefix, ReferenceFrame referenceFrame, OrientationProvider orientationProvider, double finalTime,
YoVariableRegistry parentRegistry)
{
MathTools.checkIntervalContains(finalTime, 0.0, Double.POSITIVE_INFINITY);
this.registry = new YoVariableRegistry(namePrefix + getClass().getSimpleName());
this.orientationProvider = orientationProvider;
this.orientation = new YoFrameQuaternion("orientation", referenceFrame, registry);
this.finalTime = new YoDouble("finalTime", registry);
this.time = new YoDouble("time", registry);
this.finalTime.set(finalTime);
parentRegistry.addChild(registry);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public OrientationInterpolationTrajectoryGenerator(String namePrefix, ReferenceFrame referenceFrame, DoubleProvider trajectoryTimeProvider,
OrientationProvider initialOrientationProvider, OrientationProvider finalOrientationProvider,
YoVariableRegistry parentRegistry)
{
this.registry = new YoVariableRegistry(namePrefix + getClass().getSimpleName());
this.trajectoryTime = new YoDouble(namePrefix + "TrajectoryTime", registry);
this.currentTime = new YoDouble(namePrefix + "Time", registry);
this.parameterPolynomial = new YoPolynomial(namePrefix + "ParameterPolynomial", 6, registry);
this.initialOrientation = new YoFrameQuaternion(namePrefix + "InitialOrientation", referenceFrame, registry);
this.finalOrientation = new YoFrameQuaternion(namePrefix + "FinalOrientation", referenceFrame, registry);
this.continuouslyUpdateFinalOrientation = new YoBoolean(namePrefix + "ContinuouslyUpdate", registry);
this.desiredOrientation = new YoFrameQuaternion(namePrefix + "desiredOrientation", referenceFrame, registry);
this.desiredAngularVelocity = new YoFrameVector3D(namePrefix + "desiredAngularVelocity", referenceFrame, registry);
this.desiredAngularAcceleration = new YoFrameVector3D(namePrefix + "desiredAngularAcceleration", referenceFrame, registry);
this.trajectoryTimeProvider = trajectoryTimeProvider;
this.initialOrientationProvider = initialOrientationProvider;
this.finalOrientationProvider = finalOrientationProvider;
tempInitialOrientation = new FrameQuaternion(referenceFrame);
tempFinalOrientation = new FrameQuaternion(referenceFrame);
parentRegistry.addChild(registry);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testInterpolate()
{
Random random = new Random(1776L);
YoVariableRegistry registry = new YoVariableRegistry("blop");
FrameQuaternion initialFrameOrientation = EuclidFrameRandomTools.nextFrameQuaternion(random, worldFrame);
FrameQuaternion finalFrameOrientation = EuclidFrameRandomTools.nextFrameQuaternion(random, worldFrame);
FrameQuaternion interpolatedFrameOrientation = new FrameQuaternion(worldFrame);
YoFrameQuaternion initialYoFrameQuaternion = new YoFrameQuaternion("init", worldFrame, registry);
initialYoFrameQuaternion.set(initialFrameOrientation);
YoFrameQuaternion finalYoFrameQuaternion = new YoFrameQuaternion("final", worldFrame, registry);
finalYoFrameQuaternion.set(finalFrameOrientation);
YoFrameQuaternion interpolatedYoFrameQuaternion = new YoFrameQuaternion("interpolated", worldFrame, registry);
FrameQuaternion temp = new FrameQuaternion();
for (double alpha = -0.1; alpha <= 1.1; alpha += 0.05)
{
interpolatedFrameOrientation.interpolate(initialFrameOrientation, finalFrameOrientation, alpha);
interpolatedYoFrameQuaternion.interpolate(initialYoFrameQuaternion, finalYoFrameQuaternion, alpha);
temp.setIncludingFrame(interpolatedYoFrameQuaternion);
assertTrue(interpolatedFrameOrientation.epsilonEquals(temp, EPS));
}
}
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private static YoFrameQuaternion findOrientationDesired(SimulationConstructionSet scs, RigidBodyBasics body)
{
String bodyName = body.getName();
String namespace = "FeedbackControllerToolbox";
YoDouble qx = getDoubleYoVariable(scs, bodyName + "DesiredOrientationQx", namespace);
YoDouble qy = getDoubleYoVariable(scs, bodyName + "DesiredOrientationQy", namespace);
YoDouble qz = getDoubleYoVariable(scs, bodyName + "DesiredOrientationQz", namespace);
YoDouble qs = getDoubleYoVariable(scs, bodyName + "DesiredOrientationQs", namespace);
return new YoFrameQuaternion(qx, qy, qz, qs, ReferenceFrame.getWorldFrame());
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces
public YoFrameQuaternion findYoFrameQuaternion(String quaternionPrefix, String quaternionSuffix, ReferenceFrame quaternionFrame)
{
YoDouble qx = (YoDouble) scs.getVariable(createQxName(quaternionPrefix, quaternionSuffix));
YoDouble qy = (YoDouble) scs.getVariable(createQyName(quaternionPrefix, quaternionSuffix));
YoDouble qz = (YoDouble) scs.getVariable(createQzName(quaternionPrefix, quaternionSuffix));
YoDouble qs = (YoDouble) scs.getVariable(createQsName(quaternionPrefix, quaternionSuffix));
if (qx == null || qy == null || qz == null || qs == null)
return null;
else
return new YoFrameQuaternion(qx, qy, qz, qs, quaternionFrame);
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@Before
public void setUp()
{
RigidBodyTransform transformToParent = new RigidBodyTransform();
// referenceFrame = ReferenceFrame.constructARootFrame("rootFrame");
referenceFrame = ReferenceFrame.constructFrameWithUnchangingTransformToParent("referenceFrame", rootFrame1, transformToParent);
positionYoFramePoint = new YoFramePoint3D("prefixTEST", referenceFrame, registry);
orientationQuaternion = new YoFrameQuaternion("orientationPrefix", referenceFrame, registry);
frame2 = ReferenceFrame.constructFrameWithUnchangingTransformToParent("frame2", rootFrame1, transformToParent);
positionMultipleFrames = new YoFramePointInMultipleFrames("positionMultipleFrames", registry, rootFrame1, frame2);
orientationMultipleFrames = new YoFrameQuaternionInMultipleFrames("orientationMultipleFrames", registry, rootFrame1, frame2);
generator = new ConstantPoseTrajectoryGenerator(positionYoFramePoint, orientationQuaternion);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public YoIMUMahonyFilter(String imuName, String namePrefix, String nameSuffix, double updateDT, ReferenceFrame sensorFrame,
YoVariableRegistry parentRegistry)
{
this.updateDT = updateDT;
this.sensorFrame = sensorFrame;
YoVariableRegistry registry = new YoVariableRegistry(imuName + "MahonyFilter");
parentRegistry.addChild(registry);
estimatedOrientation = new YoFrameQuaternion(namePrefix, nameSuffix, sensorFrame, registry);
estimatedAngularVelocity = new YoFrameVector3D(namePrefix, nameSuffix, sensorFrame, registry);
yoErrorTerm = new YoFrameVector3D("ErrorTerm", nameSuffix, sensorFrame, registry);
yoIntegralTerm = new YoFrameVector3D("IntegralTerm", nameSuffix, sensorFrame, registry);
proportionalGain = new YoDouble("ProportionalGain" + nameSuffix, registry);
integralGain = new YoDouble("IntegralGain" + nameSuffix, registry);
hasBeenInitialized = new YoBoolean("HasBeenInitialized" + nameSuffix, registry);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
YoFrameQuaternion yoFrameQuaternion = new YoFrameQuaternion("test", worldFrame, registry);
代码示例来源:origin: us.ihmc/ihmc-yovariables
/**
* Creates a copy of {@code this} by finding the duplicated {@code YoVariable}s in the given
* {@link YoVariableRegistry}.
* <p>
* This method does not duplicate {@code YoVariable}s. Assuming the given registry is a duplicate
* of the registry that was used to create {@code this}, this method searches for the duplicated
* {@code YoVariable}s and use them to duplicate {@code this}.
* </p>
*
* @param newRegistry YoVariableRegistry to duplicate {@code this} to.
* @return the duplicate of {@code this}.
*/
public YoFrameQuaternion duplicate(YoVariableRegistry newRegistry)
{
YoDouble x = (YoDouble) newRegistry.getVariable(getYoQx().getFullNameWithNameSpace());
YoDouble y = (YoDouble) newRegistry.getVariable(getYoQy().getFullNameWithNameSpace());
YoDouble z = (YoDouble) newRegistry.getVariable(getYoQz().getFullNameWithNameSpace());
YoDouble s = (YoDouble) newRegistry.getVariable(getYoQs().getFullNameWithNameSpace());
return new YoFrameQuaternion(x, y, z, s, getReferenceFrame());
}
代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces-test
private static YoFramePose3D findYoFramePose3D(String nameSpace, String namePrefix, String nameSuffix, SimulationConstructionSet scs)
{
YoDouble x = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createXName(namePrefix, nameSuffix));
YoDouble y = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createYName(namePrefix, nameSuffix));
YoDouble z = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createZName(namePrefix, nameSuffix));
YoFramePoint3D position = new YoFramePoint3D(x, y, z, ReferenceFrame.getWorldFrame());
YoDouble qx = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createQxName(namePrefix, nameSuffix));
YoDouble qy = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createQyName(namePrefix, nameSuffix));
YoDouble qz = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createQzName(namePrefix, nameSuffix));
YoDouble qs = (YoDouble) scs.getVariable(nameSpace, YoFrameVariableNameTools.createQsName(namePrefix, nameSuffix));
YoFrameQuaternion orientation = new YoFrameQuaternion(qx, qy, qz, qs, ReferenceFrame.getWorldFrame());
return new YoFramePose3D(position, orientation);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testMultiplication()
{
Random random = new Random(1776L);
YoVariableRegistry registry = new YoVariableRegistry("blop");
YoFrameQuaternion yoFrameQuaternion = new YoFrameQuaternion("test", worldFrame, registry);
Quaternion quat4dActual = new Quaternion(), quat4dExpected = new Quaternion();
Quaternion quat4dA, quat4dB;
FrameQuaternion frameOrientation = new FrameQuaternion(worldFrame);
for (int i = 0; i < 1000; i++)
{
quat4dA = RandomGeometry.nextQuaternion(random);
quat4dB = RandomGeometry.nextQuaternion(random);
quat4dExpected.multiply(quat4dA, quat4dB);
yoFrameQuaternion.set(quat4dA);
yoFrameQuaternion.multiply(quat4dB);
quat4dActual.set(yoFrameQuaternion);
assertTrue(RotationTools.quaternionEpsilonEquals(quat4dExpected, quat4dActual, EPS));
yoFrameQuaternion.set(quat4dA);
frameOrientation.set(quat4dB);
yoFrameQuaternion.multiply(frameOrientation);
quat4dActual.set(yoFrameQuaternion);
assertTrue(RotationTools.quaternionEpsilonEquals(quat4dExpected, quat4dActual, EPS));
}
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit-test
@ContinuousIntegrationTest(estimatedDuration = 0.0)
@Test(timeout=300000)
public void testInitialization()
{
YoVariableRegistry registry = new YoVariableRegistry("blop");
YoFrameQuaternion yoFrameQuaternion = new YoFrameQuaternion("test", worldFrame, registry);
yoFrameQuaternion.checkReferenceFrameMatch(worldFrame);
Quaternion quat4dActual = new Quaternion(yoFrameQuaternion);
Quaternion quat4dExpected = new Quaternion(0.0, 0.0, 0.0, 1.0);
assertTrue(quat4dActual.epsilonEquals(quat4dExpected, EPS));
AxisAngle axisAngle4dActual = new AxisAngle(yoFrameQuaternion);
AxisAngle axisAngle4dExpected = new AxisAngle(1.0, 0.0, 0.0, 0.0);
assertTrue(axisAngle4dActual.epsilonEquals(axisAngle4dExpected, EPS));
RotationMatrix matrix3dActual = new RotationMatrix(yoFrameQuaternion);
RotationMatrix matrix3dExpected = new RotationMatrix();
matrix3dExpected.setIdentity();
assertTrue(matrix3dActual.epsilonEquals(matrix3dExpected, EPS));
FrameQuaternion frameOrientationActual = new FrameQuaternion(yoFrameQuaternion);
FrameQuaternion frameOrientationExpected = new FrameQuaternion(worldFrame);
assertTrue(frameOrientationActual.epsilonEquals(frameOrientationExpected, EPS));
double[] yawPitchRollActual = new double[3];
yoFrameQuaternion.getYawPitchRoll(yawPitchRollActual);
double[] yawPitchRollExpected = new double[3];
assertArrayEquals(yawPitchRollExpected, yawPitchRollActual, EPS);
}
何时使用 init、带参数的 init 或 iOS 8 (Swift) 中的便利 init, Objective-C 中的 convenience init 等价于什么? 最佳答案 你的类将有一个必需
我正在阅读这个 First Search Program - Artificial Intelligence for Robotics 算法,我正在阅读它的 Python 代码。在这里,我们创建了一个
我觉得答案很明显,但我一直无法弄清楚,这对我来说似乎是一个反复出现的问题。基本上我想做这样的事情: extension NSData { convenience init(JSONObject
cloud-init 是在首次启动时在虚拟机上执行各种配置的包。您必须使用您的配置配置一个文件,然后将其扔到您的 VM 上,然后对其进行虚拟化。 但它究竟是如何工作的呢?用户数据如何发送到 VM,cl
我目前正在与 CoreOS 打交道,到目前为止,我认为我已经掌握了总体思路和概念。我还没有得到的一件事是执行 cloud-init . 我明白 cloud-init是一个为 CoreOS 做一些配置的
部署项目后,当客户端第一次向 TestServlet 发送请求时,服务器会创建 testServlet 对象,然后调用第一个 init() 方法(init(ServletConfig config))
是否有可能在 convenience init 中以某种方式解包可选 init? convenience init(...) { self.init?(...) ?? self.init() }
使用时 write_files使用 cloud-init,是否可以附加内容?如果是这样,如何? write_files: [ { "path": "/home/user/some-file
我对 Ansible 比较陌生,我创建了一个剧本,可以在“裸”服务器上安装 Tomcat 配置。我想知道如何解决能够更新 init.d 脚本的问题,同时避免在脚本没有更改时在剧本开始时停止服务。这是基
我打算在 iOS 中使用参数调用 init 方法中的默认 init 方法。像这样: -(id)init{ self = [super init]; if (self) {
Objective C 规范(来自 Apple)第 49 页指出每个声明实例变量的类都必须提供一个 init 方法来初始化它们 我的问题 -为什么这是必要的? NSObject 不会为实例初始化 iV
所以我有一个带有指定初始化器的类,它为每个存储的属性取值。我所有存储的属性也有一个默认值,所以我假设这个类有一个默认的初始化。 在我指定的 init 中,我调用 super.init() 问题是,如果
我对此有些困惑: class Person { var name: String var age: Int init(){ name = “Tim”
我有一个带有两个初始化方法的对象。其中一个接受 NSDictionary,另一个接受一大堆 String 变量。我想调用 NSDictionary init,然后从那里将我的字典转换为字符串,然后用我
我正在尝试为我的类创建一个方便的初始化:User。我之前为另一个类(class)做过这个,并且 - 再次创建它 - 我使用了相同的代码,只是我的用户类(class)有所不同。 这是我的用户类: imp
我已经通读了以下秘诀,它展示了一种使用 Google Cloud Endpoints 后端为 AngularJS 前端提供动力的方法: https://cloud.google.com/resourc
本文整理了Java中com.netflix.zuul.init.ZuulFiltersModule.()方法的一些代码示例,展示了ZuulFiltersModule.()的具体用法。这些代码示例主要来
我想实现一个 初始化 下功能 box.once() 在 Tarantool 中只执行一次,但是,只有在 时才对我有用初始化 已成功执行。 问题 : 如何使“onceinit”记录只有在 init 成功
如果在Xcode中创建新的游戏模板项目,则默认GameViewController将使用以下初始化程序实例化游戏场景: let scene = SKScene(fileNamed: "GameScen
我有一个 MKPolyline我要实现的 subblas NSCoding , IE。 @interface RSRoutePolyline : MKPolyline I asked a quest
我是一名优秀的程序员,十分优秀!