|
|
|
@ -12,16 +12,15 @@ Then connect with ArduPilot like this:
@@ -12,16 +12,15 @@ Then connect with ArduPilot like this:
|
|
|
|
|
|
|
|
|
|
sim_vehicle.py --model morse --console --map |
|
|
|
|
|
|
|
|
|
This model assumes you will setup a skid-steering rover with left throttle on |
|
|
|
|
channel 1 and right throttle on channel 2, which means you need to set: |
|
|
|
|
This model assumes you will setup a steering/throttle rover |
|
|
|
|
|
|
|
|
|
SERVO1_FUNCTION 73 |
|
|
|
|
SERVO3_FUNCTION 74 |
|
|
|
|
SERVO1_FUNCTION 26 |
|
|
|
|
SERVO3_FUNCTION 70 |
|
|
|
|
''' |
|
|
|
|
from morse.builder import * |
|
|
|
|
|
|
|
|
|
# use the ATRV rover |
|
|
|
|
vehicle = ATRV() |
|
|
|
|
# use the Hummer |
|
|
|
|
vehicle = Hummer() |
|
|
|
|
vehicle.properties(Object = True, Graspable = False, Label = "Vehicle") |
|
|
|
|
vehicle.translate(x=0.0, z=0.0) |
|
|
|
|
|
|
|
|
@ -55,12 +54,9 @@ all_sensors.add_stream('socket')
@@ -55,12 +54,9 @@ all_sensors.add_stream('socket')
|
|
|
|
|
|
|
|
|
|
vehicle.append(all_sensors) |
|
|
|
|
|
|
|
|
|
# make the vehicle controllable with speed and angular velocity |
|
|
|
|
# make the vehicle controllable with steer and force |
|
|
|
|
# this will be available on port 60001 by default |
|
|
|
|
# an example command is: |
|
|
|
|
# {"v":2, "w":1} |
|
|
|
|
# which is 2m/s fwd, and rotating left at 1 radian/second |
|
|
|
|
motion = MotionVW() |
|
|
|
|
motion = SteerForce() |
|
|
|
|
vehicle.append(motion) |
|
|
|
|
motion.add_stream('socket') |
|
|
|
|
|
|
|
|
@ -78,4 +74,4 @@ env.select_display_camera(camera)
@@ -78,4 +74,4 @@ env.select_display_camera(camera)
|
|
|
|
|
env.set_camera_clip(clip_end=1000) |
|
|
|
|
|
|
|
|
|
# startup at CMAC. A location is needed for the magnetometer |
|
|
|
|
env.properties(longitude = 149.165230, latitude = -35.363261, altitude = 584.0) |
|
|
|
|
env.properties(longitude = 149.165230, latitude = -35.363261, altitude = 584.0) |