10 #include <argos3/core/wrappers/lua/lua_utility.h>
24 int LuaSetDiffSteeringLinearVelocity(lua_State* pt_lua_state) {
26 if(lua_gettop(pt_lua_state) != 2) {
27 return luaL_error(pt_lua_state,
"robot.wheels.set_velocity() expects 2 arguments");
29 luaL_checktype(pt_lua_state, 1, LUA_TNUMBER);
30 luaL_checktype(pt_lua_state, 2, LUA_TNUMBER);
32 CLuaUtility::GetDeviceInstance<CCI_DifferentialSteeringActuator>(pt_lua_state,
"wheels")->
33 SetLinearVelocity(lua_tonumber(pt_lua_state, 1),
34 lua_tonumber(pt_lua_state, 2));
43 void CCI_DifferentialSteeringActuator::CreateLuaState(lua_State* pt_lua_state) {
The namespace containing all the ARGoS related code.
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.