jBot seeking orange traffic cones (video)
David P. Anderson
Update: 05 October 2014: jBot now has a
spiral search pattern (mpeg video) to look for orange traffic cones if it arrives at a waypoint without finding one. ( also on youtube at
The search pattern begins at the waypoint and spirals outward clockwise. If the radius of the spiral exceeds 30 feet, the robot navigates back to the waypoint and begins the spiral again, this time counter-clockwise. If that second spiral exceeds 30 feet without finding a cone, it gives up, marks the cone as "found" and proceeds on to the next waypoint. At the last waypoint on it's waypoint list, it keeps searching forever, using gradually larger and larger clockwise and counter-clockwise spirals, until it either finds a cone or I get tired of it and turn it off.
I set up a triangle waypoint list using GPS coordinates 350 feet, 450 feet, and 550 feet on each side, with traffic cones near each waypoint. The first cone is 15 feet beyond the waypoint, the second cone is 24 feet to the right of the waypoint, and the third cone is at the origin. Here's the robot attempting to navigate to those three waypoints and find the cones:
jBot navigating 1350 feet to three orange traffic cones (mpeg video). ( also on youtube at
The robot approached one cone from the sunward side, one cone from the partially shadowed side, and one cone under the shade trees, to test the camera's ability to spot the cones in different lighting conditions. Interestingly, I also ran this test later in the evening, with the sun partially clouded, bright orange, and low on the horizon. The camera kept trying to orient on the sun instead of the cones. In that case, the lack of a sonar reflection eventually steered the robot away from the sun, but something to think about... :)
Update 06 October 2014: New Bump Sensors for jBot
After some experimentation with sonar detection, I determined that jBot needs a physical bump sensor to know when it is actually touching one of the traffic cones. This can also serve double duty for collision recovery. I found these nifty switches at Tanner's Electronic Surplus, which have a metal button with an internal raised shoulder. They were chucked in the lathe and drilled and threaded for a 4-40 screw and a nylon spacer. The bumper itself is a piece of .375" aluminium tube with mounting holes for the 4-40 screws.
The switches are mounted on an aluminium angle which is bolted to the front end of the robot's upper chassis plate. They are wired in parallel to one of the MC68332 microcontroller digital I/O ports and normally pulled high by a 2.2k resistor. Closing either switch pulls the input pin to ground. The switches are debounced in software and read by the cone seeking behavior and by the collision recovery routines. Click on the bumper pictures for larger images.
23 September 2014
Here's my first pass at
jBot attempting to target 18" orange traffic
cones, as per
RoboMagellan, using it's
sonar array, and
a newly added
CMUCam for color blob recognition. The robot is looping
between two navigation way points, 50 feet apart, looking for traffic
cones along the way.
CMUCam Camera Sensor:
The CMUCam is set in YCrCb mode (rather than RGB) with the color range
set by the Cr and Cb values and the Y value adjusted for a range of
bright and dim lighting conditions. This hopefully allows it to track
the orange color of the cones in direct sunlight from various angles,
and also in the shadows from various angles. One of the two cones in
this video is set under the shade of trees, and the other is in direct
I added a neutral gray optical filter to the camera's lens, coupled to a
blue optical filter, to try to compensate for the bright outdoor
lighting. This also hopefully removes some of the sun's infrared,
which the CCD array in the camera is very sensitive to. The CMUCam
returns an x,y coordinate that is the centroid of the color blob
detected within the camera's field of view, along with the number of
pixels tracked, and a confidence value.
Four Element Sonar Array:
sonar array is conventionally used for
obstacle avoidance and is
tilted back slightly (kept level under control of an
IMU driven servo)
so that it normally won't detect curbs, fallen tree limbs, and other
objects that the
robot can easily climb over.
When the camera indicates
that it has detected an orange blob, the cone seeking behavior turns off
the obstacle avoidance, disables the outer two sonar elements, and
lowers the sonar array parallel to the ground.
Cone Finding Strategy:
If the center two sonar elements detect an object where the camera
believes there's a cone, the cone seeking behavior slows the robot to
1/4 speed and allows the camera to steer the robot. If it does not
detect an object, it re-elevates the sonar array, re-enables the outer
two sonar elements, and turns obstacle avoidance back on. This
combination of sonar and camera is an attempt to distinguish traffic
cones from other false positive color blob detections.
If the sonar does determine that an object is detected and the camera is
allowed to steer, then the cone seeking behavior halts the robot for 5
seconds when the sonar distance to the detected object falls below 8
inches --- meaning the robot is hopefully touching the cone.
It then elevates the sonar array, turns the outer two elements back on,
and re-enables obstacle avoidance. This causes the robot to execute an
escape behavior, because the avoidance behavior detects an object
directly blocking the robot's path, and that subsumes the camera
steering behavior, until the robot has turned far enough so that the
camera can no longer see the cone. At that point the navigation
behavior takes over and tries to drive the robot toward the next way point.
Here's the link.
jBot Cone Stalking Video
Some folks have reported having trouble viewing this video from our server, so here it is on
Next up: some sort of search pattern to actively find a cone that is
assumed to be somewhere near a navigation way point coordinate.
jBots homepage and
my other robots.
24 Sept 2014