private void InternalShutdown() { log_manager.addLog("rrs shutting down...", RRS.Tools.Log.LogType.INFO, "main"); Net2.Shutdown(); log_manager.addLog("rrs shutdown done", RRS.Tools.Log.LogType.INFO, "main"); }
void init() { publisher_lidar_1 = Net2.Publisher("lidar_1"); publisher_camera_color = Net2.Publisher("camera_color"); subscriber_cmd_vel = Net2.Subscriber("rrs_ros-cmd_vel"); subscriber_cmd_vel.delegateNewData += Subscriber_cmd_vel_delegateNewData; //Sensors //color_camera.delegateCameraDataChanged += Color_camera_delegateCameraDataChanged; lidar.delegateLidarDataChanged += Lidar_delegateLidarDataChanged; }
//Unity Benchamark Report //ROS2 //ROS# void init() { //Initialization publisher_lidar_net2 = Net2.Publisher("lidar"); publisher_camera_rgb_net2 = Net2.Publisher("camera_color"); publisher_camera_depth_net2 = Net2.Publisher("camera_depth"); publisher_imu_net2 = Net2.Publisher("imu"); color_camera.delegateCameraDataChanged += Color_camera_delegateCameraDataChanged; depth_camera.delegateCameraDataChanged += Depth_camera_delegateCameraDataChanged; imu.delegateIMUDataChanged += Imu_delegateIMUDataChanged; lidar.delegateLidarDataChanged += Lidar_delegateLidarDataChanged; }
void init() { initJointsConfig(); d_joints = new float[joint_numbers]; c_joints = new float[joint_numbers]; publisher_joint_state = Net2.Publisher("joint_state"); publisher_lidar_front = Net2.Publisher("lidar_front"); publisher_lidar_rear = Net2.Publisher("lidar_rear"); publisher_camera_color = Net2.Publisher("camera_color"); publisher_camera_info = Net2.Publisher("camera_info"); publisher_camera_depth = Net2.Publisher("camera_depth"); publisher_camera_segment = Net2.Publisher("camera_segment"); publisher_camera_normal = Net2.Publisher("camera_normal"); publisher_groundtruth = Net2.Publisher("groundtruth"); publisher_imu = Net2.Publisher("imu"); publisher_odometry = Net2.Publisher("odometry"); publisher_tf = Net2.Publisher("tf"); subscriber_cmd_vel = Net2.Subscriber("rrs_ros-cmd_vel"); subscriber_cmd_vel.delegateNewData += Subscriber_cmd_vel_delegateNewData; subscriber_planner_viz = Net2.Subscriber("rrs_ros-planner_viz"); subscriber_planner_viz.delegateNewData += Subscriber_planner_viz_delegateNewData; subscriber_rrs_command = Net2.Subscriber("rrs_ros-rrs_command"); subscriber_rrs_command.delegateNewData += Subscriber_rrs_command_delegateNewData; subscriber_rrs_joint_command = Net2.Subscriber("rrs_ros-joint_command"); subscriber_rrs_joint_command.delegateNewData += Subscriber_rrs_joint_command_delegateNewData; //Sensors color_camera.delegateCameraDataChanged += Color_camera_delegateCameraDataChanged; depth_camera.delegateCameraDataChanged += Depth_camera_delegateCameraDataChanged; segment_camera.delegateCameraDataChanged += Segment_camera_delegateCameraDataChanged; normal_camera.delegateCameraDataChanged += Normal_camera_delegateCameraDataChanged; imu.delegateIMUDataChanged += Imu_delegateIMUDataChanged; lidar_front.delegateLidarDataChanged += Lidar_front_delegateLidarDataChanged; lidar_rear.delegateLidarDataChanged += Lidar_rear_delegateLidarDataChanged; }
public void LoadSetting(SerializeableNetworkSettings loadedSettings) { SetUpSettingsDefault(); //Set up the interfaces and tell the UI they have changed just in case. Net1.SetUpInterfaceFromId(loadedSettings.Net1AdapterId); RaisePropertyChangedEvent("Net1Enabled"); Net2.SetUpInterfaceFromId(loadedSettings.Net2AdapterId); RaisePropertyChangedEvent("Net2Enabled"); //set up network output defaults Net1StartUniverse = loadedSettings.Net1StartUniverse; Net1UniverseCount = loadedSettings.Net1UniverseCount; Net1Enabled = loadedSettings.Net1Enabled; Net2StartUniverse = loadedSettings.Net2StartUniverse; Net2UniverseCount = loadedSettings.Net2UniverseCount; Net2Enabled = loadedSettings.Net2Enabled; //load width height and aspect lock Width = loadedSettings.Width; Height = loadedSettings.Height; LockAspect = loadedSettings.LockAspect; }
private void Initialize() { string p1 = Application.dataPath; string folder_path = p1.Replace("/Assets", "/Config/"); Directory.CreateDirectory(folder_path); log_manager = new LogManager(folder_path + "log.txt", 1000, 1048576, true); xml_manager = new DataManagerXML(); if (File.Exists(folder_path + "config.xml") == false) { xml_manager.saveXML <Config>(folder_path + "config.xml", new Config()); } ProcessResult result = xml_manager.loadXML <Config>(folder_path + "config.xml"); current_config = (Config)result.Result; net2_config = new Net2Config(); net2_config.consul_mode = RRS.Tools.Network.Net2ConsulMode.CLIENT; net2_config.consul_network_address = current_config.consul_network_address; net2_config.consul_network_port = current_config.consul_network_port; net2_config.consul_network_mask = current_config.consul_network_mask; net2_config.ntp_server_host_name = current_config.ntp_server_host_name; net2_config.local_network_address = current_config.local_network_address; net2_config.ntp_server_port = 123; net2_config.name_space = "rrs"; log_manager.addLog("rrs started", RRS.Tools.Log.LogType.INFO, "main"); Net2.delegateInfoServiceNewLog += Net2__delegateInfoServiceNewLog; Net2.Init(net2_config); }