Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish removing mission control #477

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* <li>{@link FootstepPlannerAPI}</li>
* <li>{@link us.ihmc.communication.controllerAPI.ControllerAPI}</li>
* <li>{@link HumanoidControllerAPI}</li>
* <li>{@link MissionControlAPI}</li>
* <li>{@link SystemMonitorAPI}</li>
* <li>{@link PerceptionAPI}</li>
* <li>{@link SakeHandAPI}</li>
* <li>{@link StateEstimatorAPI}</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package us.ihmc.communication;

import std_msgs.msg.dds.Empty;
import system_monitor_msgs.msg.dds.SystemResourceUsageMessage;
import system_monitor_msgs.msg.dds.SystemServiceActionMessage;
import system_monitor_msgs.msg.dds.SystemServiceLogRefreshMessage;
import system_monitor_msgs.msg.dds.SystemServiceStatusMessage;
import us.ihmc.ros2.ROS2QosProfile;
import us.ihmc.ros2.ROS2Topic;

import java.util.UUID;

public final class SystemMonitorAPI
{
/**
* Get system resource usage topic
* @param instanceId an identifier unique per machine
* @return the ROS2Topic the daemon will use for system resource usage messages
*/
public static ROS2Topic<SystemResourceUsageMessage> getSystemResourceUsageTopic(UUID instanceId)
{
String topicId = instanceId.toString().replace("-", ""); // ROS2 topic names cannot have dashes
return ROS2Tools.IHMC_ROOT.withModule("system_monitor").withSuffix(topicId).withTypeName(SystemResourceUsageMessage.class);
}

/**
* Get system service status topic
* @param instanceId an identifier unique per machine
* @return the ROS2Topic the daemon will use for system service status messages
*/
public static ROS2Topic<SystemServiceStatusMessage> getSystemServiceStatusTopic(UUID instanceId)
{
String topicId = instanceId.toString().replace("-", ""); // ROS2 topic names cannot have dashes
return ROS2Tools.IHMC_ROOT.withModule("system_monitor").withSuffix(topicId).withQoS(ROS2QosProfile.RELIABLE()).withTypeName(SystemServiceStatusMessage.class);
}

public static ROS2Topic<SystemServiceActionMessage> getSystemServiceActionTopic(UUID instanceId)
{
String topicId = instanceId.toString().replace("-", ""); // ROS2 topic names cannot have dashes
return ROS2Tools.IHMC_ROOT.withModule("system_monitor").withSuffix(topicId).withTypeName(SystemServiceActionMessage.class);
}

public static ROS2Topic<Empty> getSystemRebootTopic(UUID instanceId)
{
String topicId = instanceId.toString().replace("-", ""); // ROS2 topic names cannot have dashes
return ROS2Tools.IHMC_ROOT.withModule("system_monitor").withSuffix(topicId).withTypeName(Empty.class);
}

public static ROS2Topic<SystemServiceLogRefreshMessage> getSystemServiceLogRefreshTopic(UUID instanceId)
{
String topicId = instanceId.toString().replace("-", ""); // ROS2 topic names cannot have dashes
return ROS2Tools.IHMC_ROOT.withModule("system_monitor").withSuffix(topicId).withTypeName(SystemServiceLogRefreshMessage.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,9 @@ public class NetworkPorts

public static final NetworkPorts BEHAVIOR_MODULE_YOVARIABLESERVER_PORT = new NetworkPorts(6036, "behavior_module_yovariableserver");

// Mission control ports
public static final NetworkPorts MISSION_CONTROL_SERVER_PORT = new NetworkPorts(2046, "mission_control_server");
public static final NetworkPorts MISSION_CONTROL_CPU0_TEST_PORT = new NetworkPorts(2147, "mission_control_cpu0_test");
public static final NetworkPorts MISSION_CONTROL_CPU1_TEST_PORT = new NetworkPorts(2148, "mission_control_cpu1_test");
// public static final NetworkPorts MISSION_CONTROL_CPU2_TEST_PORT = new NetworkPorts(2149, "mission_control_cpu2_test");
public static final NetworkPorts MISSION_CONTROL_JETSON_TEST_PORT = new NetworkPorts(2150, "mission_control_jetson_test");

// Teleop ports
public static final NetworkPorts XBOX_CONTROLLER_TELEOP_PORT = new NetworkPorts(3001, "xbox_controller_teleop");

// Dynamic ports for testing purposes
public static NetworkPorts createMissionControlIntraprocessPort(NetworkPorts port)
{
return new NetworkPorts(port.getPort() + 100, port.getName() + "_intraprocess");
}

public static NetworkPorts createRandomTestPort(Random random)
{
int port = random.nextInt(65535 - 1025) + 1025;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion ihmc-interfaces/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ generatorDependencies {

val generator = us.ihmc.ros2.rosidl.ROS2InterfaceGenerator()
val msg_packages = listOf("ihmc_common_msgs",
"mission_control_msgs",
"system_monitor_msgs",
"controller_msgs",
"toolbox_msgs",
"quadruped_msgs",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef __mission_control_msgs__msg__SystemAvailableMessage__idl__
#define __mission_control_msgs__msg__SystemAvailableMessage__idl__
#ifndef __system_monitor_msgs__msg__SystemAvailableMessage__idl__
#define __system_monitor_msgs__msg__SystemAvailableMessage__idl__

module mission_control_msgs
module system_monitor_msgs
{
module msg
{
module dds
{

@TypeCode(type="mission_control_msgs::msg::dds_::SystemAvailableMessage_")
@TypeCode(type="system_monitor_msgs::msg::dds_::SystemAvailableMessage_")
struct SystemAvailableMessage
{
/**
Expand All @@ -20,7 +20,6 @@ module mission_control_msgs
* A random ID for the topic name for messages from this machine
* We do not use the hostname because we don't want to assume the hostname is normalized
* to the format of topic names (i.e. hostnames might contain spaces, end with numbers, etc)
* Generated in ihmc-high-level-behaviors/src/mission-control/java/us/ihmc/missionControl/MissionControlDaemon.java
*/
string instance_id;
};
Expand Down
Loading
Loading