us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames类的一些代码示例,展示了YoFramePoint2dInMultipleFrames类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFramePoint2dInMultipleFrames类的具体详情如下:
包路径:us.ihmc.robotics.math.frames.YoFramePoint2dInMultipleFrames
类名称:YoFramePoint2dInMultipleFrames

YoFramePoint2dInMultipleFrames介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

@Override
  public void setToNaN(ReferenceFrame desiredReferenceFrame)
  {
   setToNaN();
   multipleFramesHelper.switchCurrentReferenceFrame(desiredReferenceFrame);
  }
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

/**
* Change the current reference frame and set to zero the coordinates (different from changeFrame() ).
* @return the previous current reference frame.
*/
@Override
public ReferenceFrame switchCurrentReferenceFrame(ReferenceFrame referenceFrame)
{
 ReferenceFrame previousReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(referenceFrame);
 setToZero();
 return previousReferenceFrame;
}

代码示例来源:origin: us.ihmc/IHMCGraphicsDescription

public YoGraphicPosition(String name, YoFramePoint2dInMultipleFrames framePoint, double scale, AppearanceDefinition appearance)
{
 this(name, framePoint.buildUpdatedYoFramePointForVisualizationOnly(), scale, appearance, GraphicType.BALL);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public YoFramePoint2D buildUpdatedYoFramePointForVisualizationOnly()
{
 if (yoFramePointInWorld == null)
 {
   final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
   if (!isReferenceFrameRegistered(worldFrame))
    registerReferenceFrame(worldFrame);
   yoFramePointInWorld = new YoFramePoint2D(namePrefix, worldFrame.getName(), worldFrame, registry);
   attachVariableChangedListener(new VariableChangedListener()
   {
    private final FramePoint2D localFramePoint = new FramePoint2D();
    private final YoFramePoint2D point = yoFramePointInWorld;
    @Override
    public void notifyOfVariableChange(YoVariable<?> v)
    {
      localFramePoint.setIncludingFrame(YoFramePoint2dInMultipleFrames.this);
      point.setMatchingFrame(localFramePoint);
    }
   });
 }
 return yoFramePointInWorld;
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

@Override
public void changeFrame(ReferenceFrame desiredFrame)
{
 get(point2d);
 ReferenceFrame currentReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(desiredFrame);
 framePoint2d.setIncludingFrame(currentReferenceFrame, point2d);
 framePoint2d.changeFrame(desiredFrame);
 framePoint2d.get(point2d);
 set(point2d);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

public void setIncludingFrame(FrameTuple2DReadOnly frameTuple2d)
{
 multipleFramesHelper.switchCurrentReferenceFrame(frameTuple2d.getReferenceFrame());
 set(frameTuple2d);
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

@Override
 public void variableChanged(YoVariable<?> v)
 {
   getFrameTuple2dIncludingFrame(localFramePoint);
   point.setAndMatchFrame(localFramePoint);
 }
});

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

public YoFramePoint2d buildUpdatedYoFramePointForVisualizationOnly()
{
 if (yoFramePointInWorld == null)
 {
   final ReferenceFrame worldFrame = ReferenceFrame.getWorldFrame();
   if (!isReferenceFrameRegistered(worldFrame))
    registerReferenceFrame(worldFrame);
   yoFramePointInWorld = new YoFramePoint2d(namePrefix, worldFrame.getName(), worldFrame, registry);
   attachVariableChangedListener(new VariableChangedListener()
   {
    private final FramePoint2d localFramePoint = new FramePoint2d();
    private final YoFramePoint2d point = yoFramePointInWorld;
    @Override
    public void variableChanged(YoVariable<?> v)
    {
      getFrameTuple2dIncludingFrame(localFramePoint);
      point.setAndMatchFrame(localFramePoint);
    }
   });
 }
 return yoFramePointInWorld;
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

public void setIncludingFrame(FrameTuple2d<?, ?> frameTuple2d)
{
 multipleFramesHelper.switchCurrentReferenceFrame(frameTuple2d.getReferenceFrame());
 set(frameTuple2d);
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

@Override
public String toString()
{
 String ret = "";
 List<ReferenceFrame> referenceFrames = new ArrayList<ReferenceFrame>();
 multipleFramesHelper.getRegisteredReferenceFrames(referenceFrames);
 for (int i = 0; i < referenceFrames.size(); i++)
 {
   getFrameTuple2dIncludingFrame(framePoint2d);
   framePoint2d.changeFrame(referenceFrames.get(i));
   if (i > 0)
    ret += "\n";
   ret += framePoint2d.toString();
 }
 return ret;
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

@Override
public void changeFrame(ReferenceFrame desiredFrame)
{
 point2d.set(this);
 ReferenceFrame currentReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(desiredFrame);
 framePoint2d.setIncludingFrame(currentReferenceFrame, point2d);
 framePoint2d.changeFrame(desiredFrame);
 point2d.set(framePoint2d);
 set(point2d);
}

代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit

/**
* Change the current reference frame and set to zero the coordinates (different from changeFrame() ).
* @return the previous current reference frame.
*/
@Override
public ReferenceFrame switchCurrentReferenceFrame(ReferenceFrame referenceFrame)
{
 ReferenceFrame previousReferenceFrame = multipleFramesHelper.switchCurrentReferenceFrame(referenceFrame);
 setToZero();
 return previousReferenceFrame;
}

代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit

@Override
  public void setToNaN(ReferenceFrame desiredReferenceFrame)
  {
   setToNaN();
   multipleFramesHelper.switchCurrentReferenceFrame(desiredReferenceFrame);
  }
}

代码示例来源:origin: us.ihmc/IHMCGraphicsDescription

public YoGraphicPosition(String name, YoFramePoint2dInMultipleFrames framePoint, double scale, AppearanceDefinition appearance, GraphicType type)
{
 this(name, framePoint.buildUpdatedYoFramePointForVisualizationOnly(), scale, appearance, type);
}

相关文章