// Use this for initialization void Start() { //The attribute has been assigned in the scene so shouldn't be here //Float64SubscriberThrottle=GetComponent<Float64Subscriber>(); //Float64SubscriberSteering=GetComponent<Float64Subscriber>(); Float64SubThrottle = gameObject.AddComponent <Float64Subscriber>() as Float64Subscriber; Float64SubThrottle.Topic = "/LLC/EFFORTS/Throttle"; Float64SubThrottle.enabled = true; Float64SubThrottle.TimeStep = 0.1f; Float64SubThrottle.whatever = 0.0f; Float64SubThrottle.rate = 0.0f; //Float64SubThrottle.Outside_Time_Synchronization = true; //Float64SubThrottle.InitializeMessage(); Float64SubSteering = gameObject.AddComponent <Float64Subscriber>() as Float64Subscriber; Float64SubSteering.Topic = "/LLC/EFFORTS/Steering"; Float64SubSteering.enabled = true; Float64SubSteering.TimeStep = 0.1f; Float64SubSteering.whatever = 0.0f; Float64SubSteering.rate = 0.0f; firstTime = false; }
// Use this for initialization void Start() { #if GOODCODE //The attribute has been assigned in the scene so shouldn't be here //Float64SubscriberThrottle=GetComponent<Float64Subscriber>(); //Float64SubscriberSteering=GetComponent<Float64Subscriber>(); JointStateSubs = gameObject.AddComponent <Float64Subscriber>() as Float64Subscriber;//new ImuPublisher(); JointStateSubs.Topic = "/LLC/EFFORTS/Throttle"; JointStateSubs.enabled = true; JointStateSubs.TimeStep = 0.1f; JointStateSubs.whatever = 0.0f; JointStateSubs.rate = 0.0f; //Float64SubThrottle.Outside_Time_Synchronization = true; //Float64SubThrottle.InitializeMessage(); Float64SubSteering = gameObject.AddComponent <Float64Subscriber>() as Float64Subscriber; Float64SubSteering.Topic = "/LLC/EFFORTS/Steering"; Float64SubSteering.enabled = true; Float64SubSteering.TimeStep = 0.1f; Float64SubSteering.whatever = 0.0f; Float64SubSteering.rate = 0.0f; #endif }