public HandControlThread(RobotSide robotSide) { String nodeName = robotSide.getLowerCaseName() + "_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, getClass().getSimpleName()); realtimeRos2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.FAST_RTPS, nodeName); } }
public static RemotePlannerMessageConverter createConverter(Messager messager, String robotName, DomainFactory.PubSubImplementation implementation) { RealtimeRos2Node ros2Node = ROS2Tools.createRealtimeRos2Node(implementation, "ihmc_footstep_planner_ui"); return new RemotePlannerMessageConverter(ros2Node, messager, robotName); }
public static RemoteUIMessageConverter createConverter(Messager messager, String robotName, DomainFactory.PubSubImplementation implementation) { RealtimeRos2Node ros2Node = ROS2Tools.createRealtimeRos2Node(implementation, "ihmc_footstep_planner_ui"); return new RemoteUIMessageConverter(ros2Node, messager, robotName); }
/** * Creates a default output PacketCommunicator for the network processor. * This PacketCommunicator is also set to be used as input for the controller. * @param networkParameters */ private void createControllerCommunicator(DRCNetworkModuleParameters networkParameters) { // Apparently this can get called more than once so somebody put a check here. // Had to modify it with two possible types of comms @dcalvert if (alreadyCreatedCommunicator) return; alreadyCreatedCommunicator = true; PubSubImplementation pubSubImplementation; if (networkParameters.isLocalControllerCommunicatorEnabled()) pubSubImplementation = PubSubImplementation.INTRAPROCESS; else pubSubImplementation = PubSubImplementation.FAST_RTPS; realtimeRos2Node = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, IHMC_SIMULATION_STARTER_NODE_NAME); }
@Before public void showMemoryUsageBeforeTest() { MemoryTools.printCurrentMemoryUsageAndReturnUsedMemoryInMB(getClass().getSimpleName() + " before test."); realtimeRos2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.INTRAPROCESS, "ihmc_ros_api_test"); }
public void startServer(NetworkPorts portToOpen) throws IOException { if (ros2Node != null) { LogTools.error("There is already a log server running."); } else { ros2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.FAST_RTPS, "lidar_log"); lidarScanPublisher = ROS2Tools.createPublisher(ros2Node, LidarScanMessage.class, ROS2Tools.getDefaultTopicNameGenerator()); ros2Node.spin(); } if (currentLoggingTask == null) currentLoggingTask = executorService.scheduleAtFixedRate(this::readData, 0L, 10L, TimeUnit.MILLISECONDS); }
public void setup() localNode = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, "ihmc_footstep_planner_test"); if (VISUALIZE) messager = new SharedMemoryJavaFXMessager(FootstepPlannerMessagerAPI.API);
RealtimeRos2Node estimatorRealtimeRos2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.FAST_RTPS, realtimeThreadFactory, VALKYRIE_IHMC_ROS_ESTIMATOR_NODE_NAME); RealtimeRos2Node controllerRealtimeRos2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.FAST_RTPS, realtimeThreadFactory, VALKYRIE_IHMC_ROS_CONTROLLER_NODE_NAME); PeriodicRealtimeThreadSchedulerFactory yoVariableServerScheduler = new PeriodicRealtimeThreadSchedulerFactory(ValkyriePriorityParameters.LOGGER_PRIORITY);
public ToolboxModule(String robotName, FullHumanoidRobotModel fullRobotModelToLog, LogModelProvider modelProvider, boolean startYoVariableServer, int updatePeriodMilliseconds, PubSubImplementation pubSubImplementation) throws IOException { this.robotName = robotName; this.modelProvider = modelProvider; this.startYoVariableServer = startYoVariableServer; this.fullRobotModel = fullRobotModelToLog; realtimeRos2Node = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, "ihmc_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name)); commandInputManager = new CommandInputManager(name, createListOfSupportedCommands()); statusOutputManager = new StatusMessageOutputManager(createListOfSupportedStatus()); controllerNetworkSubscriber = new ControllerNetworkSubscriber(getSubscriberTopicNameGenerator(), commandInputManager, getPublisherTopicNameGenerator(), statusOutputManager, realtimeRos2Node); executorService = Executors.newScheduledThreadPool(1, threadFactory); timeWithoutInputsBeforeGoingToSleep.set(0.5); commandInputManager.registerHasReceivedInputListener(new HasReceivedInputListener() { private final Set<Class<? extends Command<?, ?>>> silentCommands = silentCommands(); @Override public void hasReceivedInput(Class<? extends Command<?, ?>> commandClass) { if (!silentCommands.contains(commandClass)) receivedInput.set(true); } }); controllerNetworkSubscriber.addMessageFilter(createMessageFilter()); ROS2Tools.createCallbackSubscription(realtimeRos2Node, ToolboxStateMessage.class, getSubscriberTopicNameGenerator(), s -> receivedPacket(s.takeNextData())); registerExtraPuSubs(realtimeRos2Node); realtimeRos2Node.spin(); }
uiPlanningResultReference = messager.createInput(PlanningResultTopic); ros2Node = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, "ihmc_footstep_planner_test");
uiPlanningResultReference = messager.createInput(PlanningResultTopic); ros2Node = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, "ihmc_footstep_planner_test");
this.startYoVariableServer = startYoVariableServer; this.fullRobotModel = drcRobotModel.createFullRobotModel(); realtimeRos2Node = ROS2Tools.createRealtimeRos2Node(pubSubImplementation, "ihmc_" + CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name)); CommandInputManager commandInputManager = new CommandInputManager(name, FootstepPlannerCommunicationProperties.getSupportedCommands()); StatusMessageOutputManager statusOutputManager = new StatusMessageOutputManager(FootstepPlannerCommunicationProperties.getSupportedStatusMessages());
networkModuleParameters.enableNetworkProcessor(true); ros2Node = ROS2Tools.createRealtimeRos2Node(PubSubImplementation.INTRAPROCESS, "ihmc_footstep_planner_test"); toolboxModule = new FootstepPlanningToolboxModule(getRobotModel(), null, true, PubSubImplementation.INTRAPROCESS); footstepPlanningRequestPublisher = ROS2Tools.createPublisher(ros2Node, FootstepPlanningRequestPacket.class,