Answered by:
Eddie obstacle avoidance code

Question
-
I am new to robotics. Parralax provides C# code for obstacle avoidance (source code in RDS installation : \Microsoft Robotics Dev Studio 4\samples\Platforms\ReferencePlatform2011\0. It works great. To understand the obstacle avoidance (basically how it works), I was searching though all codes provided. I somehow could not get the code part of obstacle avoidance (VPL example I found under Lab6).
Can you pl. help me ?
Thanks
Sumit
Saturday, July 28, 2012 12:12 AM
Answers
-
Hi Sumit,
The code for obstacle avoidance is the same for both the sim and the physical robot. The 'trick' is in what differential drive you are partnering with. If its the generic diff drive - then you get a 'direct' drive. Partner with obstacle avoidance drive - and you get the 'suggestion drive'.
- Proposed as answer by Greg ShirakyanModerator Friday, August 3, 2012 7:28 AM
- Marked as answer by Greg ShirakyanModerator Sunday, August 12, 2012 4:25 PM
Thursday, August 2, 2012 7:17 AMModerator
All replies
-
In ObstacleAvoidanceDrive.cs
See:
private IEnumerator<ITask> SampleSensors(DateTime timestamp)
{
// ... a bunch of code for sampling and fusing sensors, which is necessary to calculate open space width and decide whether to turn or not
// eventually call:
this.AvoidObstacles(minDepthProfile, depthCamState.MaximumRange);
}
If you follow the code flow from there, you'll see that it ends up calling:
FusePendingDriveCommandWithOpenSpaceControl(...)
which after some scaling and more math eventually calls
this.SetPowerWithAcceleration(leftPower, rightPower);
Hope it helps
- Proposed as answer by Greg ShirakyanModerator Wednesday, August 1, 2012 6:30 PM
Tuesday, July 31, 2012 10:20 PMModerator -
Thanks for the reply. The ObstacleAvoidanceDrive.cs is for simulation. I was taking about Parallax code for Eddie robot. When I installed the ParallaxKit, the following project files were installed in samples/platform/ReferencePlatform2011 folder
- Parallax2011ReferencePlatformIoController
- MarkRobot
- RobotDashboard
- SerialCOMService
I am looking for the obstacle avoidance in the above code files.
Thanks
Sumit
Wednesday, August 1, 2012 10:43 PM -
Hi Sumit,
The code for obstacle avoidance is the same for both the sim and the physical robot. The 'trick' is in what differential drive you are partnering with. If its the generic diff drive - then you get a 'direct' drive. Partner with obstacle avoidance drive - and you get the 'suggestion drive'.
- Proposed as answer by Greg ShirakyanModerator Friday, August 3, 2012 7:28 AM
- Marked as answer by Greg ShirakyanModerator Sunday, August 12, 2012 4:25 PM
Thursday, August 2, 2012 7:17 AMModerator -
Did you try using the eddieobsticleavoid.user.manifest?
Dave Smith
Sorry, it is in the samples directory of the Microsoft Robotics Development Studio main directory. Somthing like
C:\User\yourname\Microsoft Robotic Developer Studio\samples\config\eddieobsticleavoid......etc. which ever file you needed. Is that what you are looking for?
- Edited by smithdavidp Sunday, August 5, 2012 9:11 PM
Sunday, August 5, 2012 9:00 PM -
Hi Dave,
Thanks for the reply. I am using the Eddie manifest to run Parallax Eddie robot. I was looking for the obstacle avoidance part of the Parallax provided code.
Thanks
Sumit
Sunday, August 5, 2012 9:31 PM -
Yep. The directories I pointed out have the Parallax obsticleavoid that you are searching for. The Parallax install file copies the files to that location why???? I dunno. If you scroll down the list you will find them. Good luck with your project.
:-)
Dave
Dave Smith
Thursday, August 16, 2012 4:00 PM -
Thank you.
SumitThursday, August 16, 2012 10:00 PM