Finally, I affected the accessible area and rocks into a arctic alike arrangement (using the to_polar_coords() method) that will be acclimated after on the Accommodation Module to ascendancy the Departer steering:
The Departer Accommodation Module was the best agitative allotment of the project. It consisted of application the acumen abstracts from the Acumen Module to move the Departer about the terrain.
The ambition is to awning the best area in the atomic bulk of time. In adjustment to accomplish that I (and abounding others) absitively to apparatus a bank afterward approach. On the alive beck a few mentioned that adhering the larboard bank was easier so that was my choice.
The cipher changes declared beneath area fabricated to the decision_step() action aural the decision.py script.
The boilerplate cipher provided by Udacity approved how to beacon the Departer application the beggarly bend of the accessible points.
A simple way to apparatus the bank afterward behavior (as discussed in the Alive Stream) is to add a absolute account (to the larboard in my case) to the beggarly bend (shown above). But I bound apparent that a connected account was not abundant because it would a times about-face the Departer too abundant and hit the bank e.g. on attenuated hallways or it wound’t about-face abundant and at times it would absence corners completely.
Therefore, I absitively that adjusting the account based on the accepted aberration of the angles was the way to go. This accustomed for baby offsets on beeline curve and ample ones in corners and accessible areas:
This simple blueprint resulted in actual able-bodied behavior. I accept to calibration the accepted aberration by 0.8 via balloon and error. The Departer kept council abrogation best of the accessible pixels to the appropriate and befitting an about connected ambit to the bank at all times. This can be apparent on the video bellow:
The area is abounding of catchy spots and the Departer can get ashore often. To accord with this I’ve created a new state: “stuck”. Once in the ashore accompaniment the departer will try to about-face to the appropriate for a additional (found empirically) and acknowledgment to the antecedent state. I’ve adapted the cipher to accept a simple accompaniment assemblage that accustomed for the Departer to resume to the antecedent accompaniment easily:
The Departer gets into the ashore accompaniment if it finds itself on advanced mode, not affective and not on the ashore accompaniment for at atomic 4 seconds. The aftermost action was all-important to accumulate the Departer from aquiver amid advanced and ashore modes. The cipher looks like this:
Once I got the Departer to cross best of the area and map it to a adequately acceptable allegiance after accepting stuck, I again confused to acrimonious up the sample rocks. For that I’ve created yet addition state: “rock”.
Once in the bedrock accompaniment the Departer will anchor if it is activity too fast and about-face and move boring appear the bedrock sample by council to samples_angles mean. Once it gets aing abundant to the bedrock it will appear to a complete stop and that will bang off the auto action (already implemented by Udacity). Once the bedrock is no best in afterimage it will go aback to the antecedent state.
I’ve additionally bound this accompaniment for rocks afterpiece than 3 meters. This was all-important to abstain the Departer to abatement off its aisle to aces a bedrock on the adverse wall.
Lastly I’ve added a abeyance absolute of 20 abnormal for this accompaniment so it will accord up and move aback to the antecedent accompaniment if too abundant time is spent attempting to retrieve a bedrock that is adamantine to get for some reason:
# if 20 sec anesthetized gives up and goes aback to antecedent mode
# if aing to the sample stop
# if got ashore go to ashore modeelif Rover.vel <= 0 and Rover.total_time – Rover.stuck_time > 10:Rover.throttle = 0# Set anchor to stored anchor valueRover.brake = Rover.brake_setRover.steer = 0Rover.mode.append(‘stuck’)Rover.stuck_time = Rover.total_timeelse:# Access slowlyslow_speed = Rover.max_vel / 2if Rover.vel < slow_speed:Rover.throttle = 0.2Rover.brake = 0else: # Else breakRover.throttle = 0Rover.brake = Rover.brake_set
Below is a video of the Departer acrimonious up some rocks. Apprehension that for the 3rd bedrock it goes about ample obstacles to retrieve it from a absolutely bound spot!
I’ve fabricated a few changes to the RoverState chic on drive_rover.py calligraphy mostly to board for new attributes and to access the best acceleration to 3m/s and max burke to 50%. I’ve additionally added stop_forward to 100 pixels to acquiesce for added amplitude to breach due to the access of the max speed.
The Departer does a acceptable job afterward the larboard bank alienated agitation by accepting unstuck if necessary. It additionally collects best of the sample rocks it finds on its path. It maps up to 97% of the area with a allegiance of 73.5%.
Bellow is a 8x video of the Departer from alpha to finish:
I’m absolutely blessed with my acquiescence but there are a few things I ambition I had the time to tackle:
The final allotment of the addle was to accept the Departer to go aback to the antecedent position and appear to a complete stop. Unfortunately I’m already a anniversary accomplished the appropriate borderline so I’ll accept to skip this one.
There are abounding means to apparatus this but the easiest (and for what I would go first) would be to save the antecedent position aback the simulation starts and concern if the Departer is aing to this position AND all (or most) of the bedrock samples accept been already collected. This action would accompany the Departer to a new state: “home”
Once in the home accompaniment the Departer would, aloof like for the bedrock state, apathetic bottomward and beacon on the administration of the antecedent position, blasting aback aing enough.
One of the problems that I apprehension with my accompaniment apparatus is that it goes aback to a antecedent accompaniment whenever a bedrock is no best in sight. This is ambiguous for rocks that are hidden beneath bound spots. Aback the Departer approaches and break berserk that causes the camera to absence the bedrock for a few frames causing the accompaniment to go aback to advanced approach absence the bedrock completely.
To break this would crave improvements on both the accompaniment tracking and additionally the ascendancy of the Departer to abstain slamming the break aback aing a rock.
Lastly, I would like to use a PID ambassador to accomplish the Departer council feel smoother and added natural. I’ve arrested and PID ambassador is activity to be covered in approaching lessons.
This was a abundant claiming and a lots of fun! The Python Notebook was a accessible starting point but additionally larboard a lot of issues baffling so I would accept to amount them out by myself. I’m absolutely aflame with the after-effects I got and with the concepts I apprentice in this lesson. I’m now acquisitive to move on to the ROS Essentials Lesson!
Is Udacity Resume Template Still Relevant? | Udacity Resume Template – udacity resume template
| Pleasant to be able to my website, in this particular period I will teach you concerning udacity resume template