us.ihmc.simulationconstructionset.SimulationConstructionSet.getGraphics3dAdapter()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(85)

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

SimulationConstructionSet.getGraphics3dAdapter介绍

暂无

代码示例

代码示例来源:origin: us.ihmc/simulation-construction-set-tools

public RobotFreezeFramer(Robot robot, Joint rootJoint, SimulationConstructionSet scs)
{
 this.robot = robot;
 this.graphicsRobot = scs.getStandardSimulationGUI().getGraphicsRobot(robot);
 this.graphics3dAdapter = scs.getGraphics3dAdapter();
 if(rootJoint != null)
 {
   this.rootJoint = graphicsRobot.getGraphicsJoint(rootJoint);
 }
 else
 {
   this.rootJoint = graphicsRobot.getRootNode();
 }
 
 doFreezeFrame.set(false);
 freezeInterval.set(1.0);
 nextFreezeTime.set(1.0);
}

代码示例来源:origin: us.ihmc/robot-environment-awareness-application

public void startSimulation() throws IOException
{
 SimpleLidarRobot robot = new SimpleLidarRobot();
 SimulationConstructionSetParameters parameters = new SimulationConstructionSetParameters(true, RealtimeTools.nextPowerOfTwo(200000));
 SimulationConstructionSet scs = new SimulationConstructionSet(robot, parameters);
 double simDT = 0.0001;
 double controlDT = 0.01;
 scs.setDT(simDT, 10);
 scs.setSimulateDoneCriterion(() -> false);
 Graphics3DAdapter graphics3dAdapter = scs.getGraphics3dAdapter();
 YoGraphicsListRegistry yoGraphicsListRegistry = new YoGraphicsListRegistry();
 SimpleLidarRobotController controller = new SimpleLidarRobotController(robot, controlDT, ros2Node, graphics3dAdapter,
                                     yoGraphicsListRegistry);
 robot.setController(controller, (int) (controlDT / simDT));
 scs.addYoGraphicsListRegistry(yoGraphicsListRegistry);
 createGroundTypeListener(scs);
 scs.setGroundVisible(false);
 scs.startOnAThread();
 scs.simulate();
}

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

public LocalObjectCommunicator createSimulatedSensorsPacketCommunicator()
{
 scsSensorOutputPacketCommunicator = new LocalObjectCommunicator();
 if (createSCSSimulatedSensors)
 {
   DRCRobotSensorInformation sensorInformation = robotModel.getSensorInformation();
   DRCRobotJointMap jointMap = robotModel.getJointMap();
   TimestampProvider timeStampProvider = avatarSimulation.getSimulatedRobotTimeProvider();
   HumanoidFloatingRootJointRobot robot = avatarSimulation.getHumanoidFloatingRootJointRobot();
   Graphics3DAdapter graphics3dAdapter = simulationConstructionSet.getGraphics3dAdapter();
   printIfDebug("Streaming SCS Video");
   DRCRobotCameraParameters cameraParameters = sensorInformation.getCameraParameters(0);
   if (cameraParameters != null)
   {
    String cameraName = cameraParameters.getSensorNameInSdf();
    int width = sdfRobot.getCameraMount(cameraName).getImageWidth();
    int height = sdfRobot.getCameraMount(cameraName).getImageHeight();
    CameraConfiguration cameraConfiguration = new CameraConfiguration(cameraName);
    cameraConfiguration.setCameraMount(cameraName);
    int framesPerSecond = 25;
    DRCRenderedSceneVideoHandler drcRenderedSceneVideoHandler = new DRCRenderedSceneVideoHandler(scsSensorOutputPacketCommunicator);
    simulationConstructionSet.startStreamingVideoData(cameraConfiguration, width, height, drcRenderedSceneVideoHandler, timeStampProvider, framesPerSecond);
   }
   for (DRCRobotLidarParameters lidarParams : sensorInformation.getLidarParameters())
   {
    DRCLidar.setupDRCRobotLidar(robot, graphics3dAdapter, scsSensorOutputPacketCommunicator, jointMap, lidarParams, timeStampProvider, true);
   }
 }
 return scsSensorOutputPacketCommunicator;
}

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

TimestampProvider timeStampProvider = drcSimulationFactory.getTimeStampProvider();
HumanoidFloatingRootJointRobot robot = drcSimulationFactory.getRobot();
Graphics3DAdapter graphics3dAdapter = simulationConstructionSet.getGraphics3dAdapter();

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

TimestampProvider timeStampProvider = avatarSimulation.getSimulatedRobotTimeProvider();
HumanoidFloatingRootJointRobot robot = avatarSimulation.getHumanoidFloatingRootJointRobot();
Graphics3DAdapter graphics3dAdapter = simulationConstructionSet.getGraphics3dAdapter();

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

scs.addYoGraphicsListRegistry(yoGraphicsListRegistry);
scs.getGraphics3dAdapter().addRootNode(robotGraphics.getRootNode());
scs.setGroundVisible(false);
scs.startOnAThread();

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

scs.addYoGraphicsListRegistry(yoGraphicsListRegistry);
scs.getGraphics3dAdapter().addRootNode(robotGraphics.getRootNode());
scs.setGroundVisible(false);
scs.startOnAThread();

相关文章

SimulationConstructionSet类方法