Commits

bergsoe committed 83b0dff

API doc.

  • Participants
  • Parent commits b36413a

Comments (0)

Files changed (2)

File src/PaplRobwork.ml

 
 let zero_q device = Array.make (get_dof device) 0.
 
-let get_bound device get =
+let get_bound_by device get =
   let q = zero_q device in
   let () = get device q in
     q
 
-let get_lower device = get_bound device caml_robwork_getLower
-let get_upper device = get_bound device caml_robwork_getUpper
+let get_lower device = get_bound_by device caml_robwork_getLower
+let get_upper device = get_bound_by device caml_robwork_getUpper
+
+let get_bounds device = (get_lower device, get_upper device)
 
 let set_q state device q = caml_robwork_setQ state device q
 let get_q state device =

File src/PaplRobwork.mli

 *)
 
 type workcell_t
+(** Workcells. *)
+
 type state_t
+(** States. *)
+
 type device_t
+(** Devices. *)
+
 type q_t = float array
+(** Configurations. *)
+
 type time_state_t = state_t PaplTime.t
+(** Time-stamped states. *)
 
 exception Exception of string
+(** The type of exception used by this module.
+
+    The exception contains an error message.
+*)
 
 val load_workcell : string -> workcell_t
+(** Load a workcell from a file.
+
+    An exception is thrown if the workcell can't be loaded.
+*)
+
 val get_state : workcell_t -> state_t
+(** [get_state workcell] is a copy of the initial workcell state.
+*)
+
 val get_device : workcell_t -> string -> device_t
+(** [get_device workcell name] is the device of [workcell] named [name].
+
+    An exception is thrown if no device of this name can be found.
+*)
+
 val get_dof : device_t -> int
-val get_lower : device_t -> q_t
-val get_upper : device_t -> q_t
+(** The number of degrees of freedom of a device.
+*)
+
+val get_bounds : device_t -> q_t * q_t
+(** The configuration space box of the device.
+*)
+
 val set_q : state_t -> device_t -> q_t -> unit
+(** Set a configuration for a device.
+
+    [set_q state device q] writes the configuration [q] for [device] to [state].
+*)
+
 val get_q : state_t -> device_t -> q_t
+(** The configuration of a device.
+
+    [q = get_q state device] is the configuration [q] in [state] for [device].
+*)
+
 val in_collision : workcell_t -> state_t -> bool
+(** Collision detection for a workcell.
+
+    [in_collision workcell state] is [true] iff the workcell is in collision in
+    the state [state].
+*)
+
 val write_time_states : workcell_t -> time_state_t list -> string -> unit
+(** Write a path of time-stamped states to a file.
+*)