Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /code/player/trunk/client_libs/libplayerc/dev_planner.c [r9139] .. [r9140] Maximize Restore

  Switch to side-by-side view

--- a/code/player/trunk/client_libs/libplayerc/dev_planner.c
+++ b/code/player/trunk/client_libs/libplayerc/dev_planner.c
@@ -40,7 +40,7 @@
  * Desc: Planner device proxy
  * Author: Brian Gerkey
  * Date: June 2004
- * CVS: $Id: dev_planner.c 9120 2013-01-07 00:18:52Z jpgr87 $
+ * CVS: $Id: dev_planner.c 9140 2014-02-18 02:50:47Z jpgr87 $
  **************************************************************************/
 
 #include <assert.h>
@@ -139,6 +139,21 @@
                               &cmd, NULL);
 }
 
+int
+playerc_planner_set_cmd_start(playerc_planner_t *device,
+                                 double sx, double sy, double sa)
+{
+  player_planner_cmd_t cmd;
+  
+  cmd.goal.px = sx;
+  cmd.goal.py = sy;
+  cmd.goal.pa = sa;
+
+  return playerc_client_write(device->info.client, &device->info,
+                              PLAYER_PLANNER_CMD_START,
+                              &cmd, NULL);
+}
+
 // Get the list of waypoints.  The writes the result into the proxy
 // rather than returning it to the caller.
 int playerc_planner_get_waypoints(playerc_planner_t *device)
@@ -160,6 +175,7 @@
     device->waypoints[i][1] = config->waypoints[i].py;
     device->waypoints[i][2] = config->waypoints[i].pa;
   }
+  device->waypoint_distance = config->waypoints_distance;
   player_planner_waypoints_req_t_free(config);
   return 0;
 }