-- シミュレーションの設定ファイル
-- Satofumi KAMIMURA
-- $Id: simulation_settings.lua 1441 2009-10-23 08:49:31Z satofumi $


-- 利用デバイスの初期化
DeviceManager():createDevice("/dev/usb/ttyUSB0", "BeegoDrive", "run")
DeviceManager():createDevice("/dev/ttyACM0", "UrgDevice", "urg")


-- デバイスを作成
DeviceManager():device("run"):activate()
DeviceManager():device("urg"):activate()


-- デバイス位置を設定
local run = DeviceManager():model("run")
run:setPosition(Position(0, 0, deg(0)), nil, false)

local urg = DeviceManager():model("urg")
urg:setPosition3d(Point3d(70, 0, 100), 0.0, 0.0, 1.0, deg(0), run, true)


-- カメラ視点を設定
CameraViewManager():setInitialView(0.0, 0.0, 3.0, deg(0), deg(0), deg(0))


-- 障害物を配置

-- 長い壁
--local box = Box(2000, 100, 300, 1.0)
--box:setPosition(Position(0, -700, deg(0)), nil, false)

-- 棒
local cylinder = Cylinder(20, 300, 1.0)
cylinder:setPosition(Position(500, 1000, deg(0)), nil, false)

local cylinder = Cylinder(20, 300, 1.0)
cylinder:setPosition(Position(1000, 1000, deg(0)), nil, false)

local cylinder = Cylinder(20, 300, 1.0)
cylinder:setPosition(Position(1000, -500, deg(0)), nil, false)
