Difference between revisions of "Project2: Triangulation with sbRIO robots"
From ESE497 Wiki
Jump to navigationJump to searchLine 4: | Line 4: | ||
* Make sure you run your code from a mapped network drive | * Make sure you run your code from a mapped network drive | ||
* Run Sample Code: | * Run Sample Code: | ||
− | ** | + | ** Turn on the Master power switch and the Motor switch on one of the sbRIO robots. Wait 10 seconds and right click on Robot0 and select Properties and enter the IP labeled on the robot. |
+ | ** Open Robot0 -> RobotMicSourceLocator.vi. Run this VI. Always run the robot program before the computer program so that the shared variable is deployed. | ||
** Open My Computer -> SingleRobotControl.vi. Run this VI. | ** Open My Computer -> SingleRobotControl.vi. Run this VI. | ||
− | |||
** Once both VIs are running, you should see the MicSourcLocator-Robots -> MotorMoving indicator turn off and the b value of SingleRobotControl.vi -> PairSolutions count up. The signals for both microphones will be displayed on the graph of RobotMicSourceLocator.vi | ** Once both VIs are running, you should see the MicSourcLocator-Robots -> MotorMoving indicator turn off and the b value of SingleRobotControl.vi -> PairSolutions count up. The signals for both microphones will be displayed on the graph of RobotMicSourceLocator.vi | ||
− | ** Click on MicSourceLocator-Robots.vi -> MoveRobots and the motors should turn 1 revolution. | + | ** Click on MicSourceLocator-Robots.vi -> MoveRobots and the motors should turn 1 wheel revolution. |
== Project 2 == | == Project 2 == | ||
* Part A: '''Compute Angle on a Single Robot''' | * Part A: '''Compute Angle on a Single Robot''' |
Revision as of 21:34, 21 May 2013
- Download RoboticSensing.zip and extract to your Home Directory if you haven't already. Run RoboticSensing\MicSourceLocator.lvproj.
- Description of RoboticSensing.lvproj
- Make sure you run your code from a mapped network drive
- Run Sample Code:
- Turn on the Master power switch and the Motor switch on one of the sbRIO robots. Wait 10 seconds and right click on Robot0 and select Properties and enter the IP labeled on the robot.
- Open Robot0 -> RobotMicSourceLocator.vi. Run this VI. Always run the robot program before the computer program so that the shared variable is deployed.
- Open My Computer -> SingleRobotControl.vi. Run this VI.
- Once both VIs are running, you should see the MicSourcLocator-Robots -> MotorMoving indicator turn off and the b value of SingleRobotControl.vi -> PairSolutions count up. The signals for both microphones will be displayed on the graph of RobotMicSourceLocator.vi
- Click on MicSourceLocator-Robots.vi -> MoveRobots and the motors should turn 1 wheel revolution.
Project 2
- Part A: Compute Angle on a Single Robot
- Modify RobotMicSourceLocator to Compute the angle of arrival on the Robot platform using your FindCCPeak.vi and ComputeAngle.vi. It should transmit the angle to MicSourceLocaotr-Robots running on the PC using the Shared Variables.
- If you get error -52003, there is probably an un-handled exception. If you are using Cross-Correlation then the problem is you are running out of memory.
- Part B: Move the Robot
- Modify MoveRobot vi to move the robot to the position indicated by the SharedVariable sent from SingleRobotControl->RobotLoc. You will have to push the MoveRobots control to get it to send the new X,Y and Rotation to the robot.
- Part C: Source Location using 2 Robots
- Use My Computer -> MicSourceLocator-Robots.vi to communicate with 2 robots.
- Change NUM_ROBOTS variable by right-clicking on Project -> Properties -> Conditional Disable Symbols and set NUM_ROBOTS = 2
- Modify MicSourceLocator-Robots.vi to compute the source location and plot the web using the angles computed on the robots
- Our derivation assumes that the accoustic source is in the +y half plane of both microphone pairs so only put the sources in that region.
- Make sure it works for Rotation = 45 on the right microphone pair and Rotation = -45 for the left microphone pair.
- Test on the 2 robot microphone array
- Test out your triangulation with the robots in different position and rotations as commanded by MicSourceLocator-Robots.
- Part D: Track Audio Source Automatically
- Modify MicSourceLocator (PC with Robots).vi to autmoatically move the robots towards the estimate source position. The goal is to position them 0.4m from the source rotated +/- 45 degrees from the x-axis.
- Make sure you compare the automated robot locations against the previously computed robot locations to make sure they are the same (or close) before commanding the motors to move. This is necessary because the triangulation doesn't work well while the source is moving.
- An even more robust design will check to see if it the robots are within a small window of the source before updating the robot position so you don't move the robots based on quantization noise