10 #include <argos3/core/wrappers/lua/lua_utility.h>
32 int LuaGripperLockPositive(lua_State* pt_lua_state) {
34 if(lua_gettop(pt_lua_state) != 0) {
35 return luaL_error(pt_lua_state,
"robot.gripper.lock_positive() expects no arguments");
38 CLuaUtility::GetDeviceInstance<CCI_FootBotGripperActuator>(pt_lua_state,
"gripper")->LockPositive();
45 int LuaGripperLockNegative(lua_State* pt_lua_state) {
47 if(lua_gettop(pt_lua_state) != 0) {
48 return luaL_error(pt_lua_state,
"robot.gripper.lock_negative() expects no arguments");
51 CLuaUtility::GetDeviceInstance<CCI_FootBotGripperActuator>(pt_lua_state,
"gripper")->LockNegative();
58 int LuaGripperUnlock(lua_State* pt_lua_state) {
60 if(lua_gettop(pt_lua_state) != 0) {
61 return luaL_error(pt_lua_state,
"robot.gripper.unlock() expects no arguments");
64 CLuaUtility::GetDeviceInstance<CCI_FootBotGripperActuator>(pt_lua_state,
"gripper")->Unlock();
73 m_cAperture(UNLOCKED) {}
108 #ifdef ARGOS_WITH_LUA
109 void CCI_FootBotGripperActuator::CreateLuaState(lua_State* pt_lua_state) {
#define ARGOS_PI
To be used when initializing static variables.
The namespace containing all the ARGoS related code.
CRange< CRadians > APERTURE_RANGE(CCI_FootBotGripperActuator::LOCKED_NEGATIVE, CCI_FootBotGripperActuator::LOCKED_POSITIVE)
It defines the basic type CRadians, used to store an angle value in radians.
CRadians & SignedNormalize()
Normalizes the value in the range [-PI:PI].
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 OpenRobotStateTable(lua_State *pt_state, const std::string &str_key)
Opens a table in the robot state, creating it if it does not exist.
static void CloseRobotStateTable(lua_State *pt_state)
Closes a table in the robot state.
void SetAperture(const CRadians &c_aperture)
Sets the gripper aperture.
void Unlock()
Unlock gripper: objects are released.
static CRadians LOCKED_NEGATIVE
void LockNegative()
Sets gripper aperture to lock, negative direction.
CCI_FootBotGripperActuator()
Class constructor.
static CRadians LOCKED_POSITIVE
void LockPositive()
Sets gripper aperture to lock, positive direction.