/// <summary> /// World service /// </summary> /// <param name="arn"></param> public WorldService(ArbiterRoadNetwork arn) { this.RoadNetwork = arn; this.worldState = new WorldState(); this.lidar = new SimSensor(Math.PI/3, -Math.PI/3, 0.5*Math.PI/180.0, SensorType.Scan, 50); this.lidar2 = new SimSensor(4 * Math.PI / 3, 2 * Math.PI / 3, 0.5 * Math.PI / 180.0, SensorType.Scan, 30); }
/// <summary> /// Initialize this instance. /// </summary> public override void Initialize() { base.Initialize(); TheSensor = new SimSensor <BaseGameEntity>(this); TheSensor.Initialize(); }
static void Main(string[] args) { SimSensor sensor = new SimSensor(Math.PI/4, -Math.PI/4, 1*Math.PI/180, SensorType.Scan, 30); SimObstacleState obsState = new SimObstacleState(); obsState.Position = new Coordinates(5, 5); obsState.Length = 4; obsState.Width = 2; obsState.Heading = new Coordinates(1, 0); Polygon[] poly = new Polygon[] { obsState.ToPolygon() }; SceneEstimatorUntrackedClusterCollection clusters = new SceneEstimatorUntrackedClusterCollection(); sensor.GetHits(poly, Coordinates.Zero, 0, clusters); SimulatorClient client = new SimulatorClient(); client.BeginClient(); }
static void Main(string[] args) { SimSensor sensor = new SimSensor(Math.PI / 4, -Math.PI / 4, 1 * Math.PI / 180, SensorType.Scan, 30); SimObstacleState obsState = new SimObstacleState(); obsState.Position = new Coordinates(5, 5); obsState.Length = 4; obsState.Width = 2; obsState.Heading = new Coordinates(1, 0); Polygon[] poly = new Polygon[] { obsState.ToPolygon() }; SceneEstimatorUntrackedClusterCollection clusters = new SceneEstimatorUntrackedClusterCollection(); sensor.GetHits(poly, Coordinates.Zero, 0, clusters); SimulatorClient client = new SimulatorClient(); client.BeginClient(); }