LabVIEW Robotics Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

NIWeek 2010 Robotics Swarm Demo: Path Planning

This page is part of the NIWeek 2010 Robotics Demo series of blog  posts.  For an introduction to the demo and links to other parts of the  series, visit http://decibel.ni.com/content/docs/DOC-13031/.

Overview

Our previous post on obstacle avoidance, mapping, and steering explains how we made our robots successfully move throughout the robot arena.  If you consider the fully and semi-autonomous modes in which our robots can operate, however, you might think we've put the cart before the horse.  That is, we haven't answered how the robots know where to drive to.  This final part of our NIWeek Demo series explains a little about how our robots generated paths to follow throughout the arena.

Architecture

You can find our path planning code at (path as viewed in NIWeek 2010 Robotics Demo.lvproj😞

  • NI Starter Kit > Path Planning > NI_Robotics_AutonomousExplorerLoop.lvlib > Autonomous Explorer Loop.vi
  • NI Starter Kit > Path Planning > NI_Robotics_PathPlanningLoop.lvlib > Path Planning Loop.vi

If you recall from our Driver Station User Interface post, when in fully autonomous mode, robots generate a destination, or goal position, to which  to navigate. The Autonomous Explorer Loop VI referenced above automatically performs this task when the following criteria are met: 1) The robot's current goal position is explored and the robots are still trying to explore the arena, or 2) the robot has reached its current goal or the current goal is unreachable. In semi-autonomous mode, a user at a driver station selects a goal position on the map for his or her robot to navigate to. In both cases, after a robot has a goal position, it still must perform path planning to get from its current  location to its destination.

Put simply, a robot operating autonomously calculates the shortest path through the 20 x 20 cell occupancy grid from its current position to the goal position (remember, our obstacle avoidance, mapping, and steering post discusses our demo's map and occupancy grid). To accomplish this, the Path Planning Loop VI performs the following tasks.

  1. Converts the current position of the robot and the goal position to the nearest grid indexes. 
  2. Creates references to these two indexes. These references serve as the start reference and goal reference inputs of the A* VI, which also ships with the Robotics Module.
  3. Uses the A* VI to calculate the lowest-cost path between the start position and the goal position (read more about how costs are determined in the obstacle avoidance, mapping, and steering post). The path is in the form of an array of x- and y-coordinate pairs that represent waypoints within the map.
  4. Creates and sends a message to the ObstacleAvoid Loop VI that includes the waypoints that make up the path. The ObstacleAvoid Loop VI then calculates an appropriate velocity vector that will steer the robot from waypoint to waypoint without it colliding with stationary obstacles or other robots.

Conclusion

This post concludes our NIWeek 2010 Robotics Demo series.  In following our discussions, from data communication to simulating GPS data to detecting and avoiding obstacles, we hope you've gained a few new ideas to use when tackling robotics applications of your own.  While you're out there solving problems and implementing your own solutions, we'd love for you to join in here in the LabVIEW Robotics Community by sharing your own robotics-related example programs, instrument drivers and other software IP for LabVIEW Robotics.

Contributors