8 #include <argos3/core/utility/math/range.h>
11 #include <argos3/core/wrappers/lua/lua_utility.h>
19 CRange<Real> UNIT(0.0f, 1.0f);
28 int LuaGripperLock(lua_State* pt_lua_state) {
30 if(lua_gettop(pt_lua_state) != 0) {
31 return luaL_error(pt_lua_state,
"robot.gripper.lock() expects no arguments");
34 CLuaUtility::GetDeviceInstance<CCI_GripperActuator>(pt_lua_state,
"gripper")->Lock();
41 int LuaGripperUnlock(lua_State* pt_lua_state) {
43 if(lua_gettop(pt_lua_state) != 0) {
44 return luaL_error(pt_lua_state,
"robot.gripper.unlock() expects no arguments");
47 CLuaUtility::GetDeviceInstance<CCI_GripperActuator>(pt_lua_state,
"gripper")->Unlock();
62 UNIT.TruncValue(f_lock_state);
84 void CCI_GripperActuator::CreateLuaState(lua_State* pt_lua_state) {
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
static void EndTable(lua_State *pt_state)
Adds a table to the Lua stack.
static void AddToTable(lua_State *pt_state, const std::string &str_key, void *pt_data)
Adds a pointer to a chunk of data with the given string key to the table located at the top of the st...
static void StartTable(lua_State *pt_state, const std::string &str_key)
Adds a table with the given string key to the table located at the top of the stack.
void SetLockState(Real f_lock_state)
Sets the gripper lock state.
void Lock()
Locks the gripper.
CCI_GripperActuator()
Class constructor.
void Unlock()
Unlocks the gripper.