-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.py
47 lines (33 loc) · 1.02 KB
/
default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /usr/bin/env morseexec
from morse.builder import *
import bpy
from random import randrange,randint
import random
from morse.sensors import *
robot = ATRV()
robot.translate(0.0, 0.0, 0.9)
robot.rotate(0.0, 0.0, 0.0)
motion = MotionVW()
robot.append(motion)
# Add a keyboard controller to move the robot with arrow keys.
# keyboard = Keyboard()
# robot.append(keyboard)
# keyboard.properties(ControlType = 'Position')
pose = Pose()
robot.append(pose)
waypoint = Waypoint()
waypoint.properties(ObstacleAvoidance=False)
waypoint.translate(x=0.2,y=0.0,z=0.9)
waypoint.rotate(0.0, 0.0, 0.0)
waypoint.add_interface('socket')
robot.append(waypoint)
laserscanner = Sick()
laserscanner.translate(x=0.2, y=0.0,z=0.6)
laserscanner.rotate(0.0, 0.0, 0.0)
robot.append(laserscanner)
laserscanner.add_interface('socket')
laserscanner.properties(visible_arc=True)
robot.add_default_interface('socket')
env = Environment('indoors-1/indoor-1', fastmode = False)
env.set_camera_location([-18.0, -6.7, 10.8])
env.set_camera_rotation([1.09, 0, -1.14])