chuycepeda
User
 Senior Boarder
| Posts: 14 |   | Karma: 4
|
Multi-Robot SLAM - 2010/02/27 05:44
How do you think computational cost is increased by extending ExplorerSim service for 3 Pioneers..
I have it now running at 17FPS so it turns really bad...I have Core 2 Duo Centrino at 2.20GHz...
My basic extension is included in the Start() method and with the inclusion of additional ports for managing each LRF separately. Here's the code. Pioneers are running motion commands with very very basic obstacle avoidance, so for now I don't know how to optimize my code... =S
| Code: |
#region notification handler setup
MainPortInterleave.CombineWith(
Arbiter.Interleave(
new TeardownReceiverGroup(Arbiter.Receive<DsspDefaultDrop>(false, _mainPort, DropHandler)),
new ExclusiveReceiverGroup(),
new ConcurrentReceiverGroup(Arbiter.Receive<Get>(true, _mainPort, GetHandler),
Arbiter.Receive<dssp.DsspDefaultLookup>(true, _mainPort, DefaultLookupHandler))
)
);
if (lrfenable)
{
MainPortInterleave.CombineWith(
Arbiter.Interleave(
new TeardownReceiverGroup(),
new ExclusiveReceiverGroup(
Arbiter.Receive<LaserRangeFinderResetUpdate>(true, _mainPort, LaserRangeFinderResetUpdateHandler),
Arbiter.Receive<LaserRangeFinderUpdate>(true, _mainPort, LaserRangeFinderUpdateHandler)
),
new ConcurrentReceiverGroup()
)
);
}
if (lrfenable2)
{
MainPortInterleave.CombineWith(
Arbiter.Interleave(
new TeardownReceiverGroup(),
new ExclusiveReceiverGroup(
Arbiter.Receive<LaserRangeFinderResetUpdate>(true, _mainPort2, LaserRangeFinderResetUpdateHandler2),
Arbiter.Receive<LaserRangeFinderUpdate>(true, _mainPort2, LaserRangeFinderUpdateHandler2)
),
new ConcurrentReceiverGroup()
)
);
}
if (lrfenable3)
{
MainPortInterleave.CombineWith(
Arbiter.Interleave(
new TeardownReceiverGroup(),
new ExclusiveReceiverGroup(
Arbiter.Receive<LaserRangeFinderResetUpdate>(true, _mainPort3, LaserRangeFinderResetUpdateHandler3),
Arbiter.Receive<LaserRangeFinderUpdate>(true, _mainPort3, LaserRangeFinderUpdateHandler3)
),
new ConcurrentReceiverGroup()
)
);
}
MainPortInterleave.CombineWith(
Arbiter.Interleave(
new TeardownReceiverGroup(),
new ExclusiveReceiverGroup(),
new ConcurrentReceiverGroup(
Arbiter.Receive<sicklrf.Reset>(true, _lrfNotifyPort, LaserResetNotification),
Arbiter.Receive<sicklrf2.Reset>(true, _lrfNotifyPort2, LaserResetNotification2),
Arbiter.Receive<sicklrf3.Reset>(true, _lrfNotifyPort3, LaserResetNotification3)
)
)
);
Activate(
Arbiter.ReceiveWithIterator<sicklrf.Replace>(false, _lrfNotifyPort, LaserReplaceNotification),
Arbiter.ReceiveWithIterator<sicklrf2.Replace>(false, _lrfNotifyPort2, LaserReplaceNotification2),
Arbiter.ReceiveWithIterator<sicklrf3.Replace>(false, _lrfNotifyPort3, LaserReplaceNotification3)
);
#endregion
|
I'm Mexican, so also Spanish comments could be appreciated !!!
|