void AddScribblerRobot(Vector3 position) { ScribblerRobot robotBaseEntity = CreateScribblerMotorBase(ref position); // Create bumper array entity and start simulated bumper service //BumperArrayEntity bumperArray = CreateLegoNxtBumper(); // insert as child of motor base //robotBaseEntity.InsertEntity(bumperArray); // Finaly insert the motor base and its two children // to the simulation SimulationEngine.GlobalInstancePort.Insert(robotBaseEntity); }
private ScribblerRobot CreateScribblerMotorBase(ref Vector3 position) { // use supplied entity that creates a motor base // with 2 active wheels and one caster ScribblerRobot robotBaseEntity = new ScribblerRobot(position); // specify mesh. robotBaseEntity.State.Assets.Mesh = "Scribbler.bos"; // the name below must match manifest robotBaseEntity.State.Name = "ScribblerRobot"; //"\ScribblerRobot"; // Start simulated motor service //drive.Contract.CreateService(ConstructorPort, // Microsoft.Robotics.Simulation.Partners.CreateEntityPartner( // "http://localhost/" + robotBaseEntity.State.Name) //); return(robotBaseEntity); }
void AddScribblerRobot(Vector3 position) { ScribblerRobot robotBaseEntity = CreateScribblerMotorBase(ref position); // Create bumper array entity and start simulated bumper service BumperArrayEntity bumperArray = CreateBumperArray(); // insert as child of motor base robotBaseEntity.InsertEntity(bumperArray); // create Camera Entity ans start SimulatedWebcam service CameraEntity camera = CreateCamera(); // insert as child of motor base robotBaseEntity.InsertEntity(camera); // Finaly insert the motor base and its two children // to the simulation SimulationEngine.GlobalInstancePort.Insert(robotBaseEntity); }