libsarathi::serverProxy Class Reference

libsarathi server proxy class More...

#include <libsarathi.hpp>

List of all members.

Public Member Functions

int initialize (const std::string url, int port)
 Initialize the server proxy object with a hostname/ip-address and port number.
int stop (bool terminate_on_error)
 Send a stop command to the robot.
int set_planner_file (std::string filename)
 Set the scene file for the planner.
int plan_to (std::string spacetype, hyperpoint *from, hyperpoint *to)
 Plan a path between two hyperpoints.
int plan_along (std::string spacetype, hyperarray *keypoints)
 Plan a path along two or more hyperpoints.
int get_path (std::string spacetype, hyperarray *path)
 Get the path planned by the path planner.
int clear_path (void)
 clears any path currently stored within the Sarathi server
int get_position (std::string spacetype, hyperpoint *curr_pos)
 Get current position of the robot and gripper.
int set_position (std::string spacetype, hyperpoint *des_pos)
 Set current position of the robot.
int move (void)
 Move the robot along pre-planned path.
int move_to (std::string spacetype, hyperpoint *point)
 Move the robot from one point to another.
int move_along (std::string spacetype, hyperarray *pointlist)
 Move the robot along a specific set of points.
int get_planning_status (std::string &status, bool &done, bool &result)
 Get the status of the planner.
int get_motion_status (std::string &status, bool &done, bool &result)
 Get the status of the robot motion controller.

Detailed Description

libsarathi server proxy class

An object of this class should be created and then its methods called to perform various actions on the Sarathi server

Definition at line 114 of file libsarathi.hpp.


Member Function Documentation

int libsarathi::serverProxy::clear_path ( void   ) 

clears any path currently stored within the Sarathi server

Warning:
This function is not yet implemented

Definition at line 159 of file libsarathi.cpp.

int libsarathi::serverProxy::get_motion_status ( std::string &  status,
bool &  done,
bool &  result 
)

Get the status of the robot motion controller.

The function returns a string describing whether the robot motion (typically after a move() command) is completed or not. The string also mentions whether the robot actually reached the desired endpoint, or if the motion sequence was aborted before the desired endpoint was reached.

Parameters:
[out] status A string describing the motion status
[out] done Value indicating whether the motion is complete
[out] result Value indicating whether the desired endpoint was reached

Definition at line 241 of file libsarathi.cpp.

int libsarathi::serverProxy::get_path ( std::string  spacetype,
hyperarray *  path 
)

Get the path planned by the path planner.

The path can be requested either in configuration space or cartesian space. NOTE: In configuration space, the joint values are normalized to [0,1]

Warning:
Currently, only configuration spacetype is supported. If spacetype is set to cartesian, it will be ignored and a configuration space path will be returned.
Parameters:
[in] spacetype The spacetype in which the path must be returned
[out] path A hyperarray containing the planned path

Definition at line 150 of file libsarathi.cpp.

int libsarathi::serverProxy::get_planning_status ( std::string &  status,
bool &  done,
bool &  result 
)

Get the status of the planner.

The function returns a string describing whether the planning process is completed and whether the planning was successful or not.

Parameters:
[out] status A string describing the planning status
[out] done Value indicating whether the planning process is complete
[out] result Value indicating whether the planning process resulted in a successful plan

Definition at line 218 of file libsarathi.cpp.

int libsarathi::serverProxy::get_position ( std::string  spacetype,
hyperpoint *  curr_pos 
)

Get current position of the robot and gripper.

NOTE: In configuration space, the joint values are normalized to [0,1]

Parameters:
[in] spacetype The spacetype in which the position must be returned
[out] curr_pos A hyperpoint containing the current position

Definition at line 169 of file libsarathi.cpp.

int libsarathi::serverProxy::initialize ( const std::string  url,
int  port 
)

Initialize the server proxy object with a hostname/ip-address and port number.

This will be the address and portnumber which the Sarathi server is running on.

Parameters:
[in] url The URL or ip address of the server. e.g: "127.0.0.1"
[in] port The port number the server is listning on

Definition at line 95 of file libsarathi.cpp.

int libsarathi::serverProxy::move ( void   ) 

Move the robot along pre-planned path.

Before using this function, the plan_along function must have successfully planned a path.

Definition at line 188 of file libsarathi.cpp.

int libsarathi::serverProxy::move_along ( std::string  spacetype,
hyperarray *  pointlist 
)

Move the robot along a specific set of points.

Warning:
This function is not implemented yet
See also:
move()

Definition at line 208 of file libsarathi.cpp.

int libsarathi::serverProxy::move_to ( std::string  spacetype,
hyperpoint *  point 
)

Move the robot from one point to another.

Warning:
This function is not implemented yet
See also:
move()

Definition at line 198 of file libsarathi.cpp.

int libsarathi::serverProxy::plan_along ( std::string  spacetype,
hyperarray *  keypoints 
)

Plan a path along two or more hyperpoints.

Every hyperpoint in the hyperarray argument will be a point in the path. NOTE: If the spacetype is "configuration", the hyperpoints MUST be normalized i.e. be in [0,1] where 0 represents the minimum possible joint angle and 1 represents the maximum.

Parameters:
[in] spacetype The spacetype in which the points of the hyperarray are defined. One of 'cartesian' or 'configuration'
[in] keypoints A hyperarray containing the hyperpoints which must be included in the path

Definition at line 140 of file libsarathi.cpp.

int libsarathi::serverProxy::plan_to ( std::string  spacetype,
hyperpoint *  from,
hyperpoint *  to 
)

Plan a path between two hyperpoints.

Warning:
This function has NOT been implemented yet
See also:
plan_along()

Definition at line 130 of file libsarathi.cpp.

int libsarathi::serverProxy::set_planner_file ( std::string  filename  ) 

Set the scene file for the planner.

The file can have either an absolute or a relative path. If a relative path is provided, the server will look for the file in the scenes_directory set for the planner plugin.

Parameters:
[in] filename the name of the planner scene file

Definition at line 120 of file libsarathi.cpp.

int libsarathi::serverProxy::set_position ( std::string  spacetype,
hyperpoint *  des_pos 
)

Set current position of the robot.

This command totally ignores the path planner/motion controller and directly calls motion function in the robot API NOTE: In configuration space, the joint values specified must be normalized to [0,1]

Parameters:
[in] spacetype The spacetype in which the position is specified
[in] des_pos A hyperpoint specifying the position to move to.

Definition at line 178 of file libsarathi.cpp.

int libsarathi::serverProxy::stop ( bool  terminate_on_error  ) 

Send a stop command to the robot.

If terminate_on_error is set to true, the server execution will be terminated, if an error occurs while stopping the robot

Parameters:
[in] terminate_on_error set to true if server should be terminated if an error occurs while stopping the robot

Definition at line 110 of file libsarathi.cpp.


The documentation for this class was generated from the following files:

Generated on Thu Dec 10 01:55:19 2009 for Libsarathi by  doxygen 1.6.1