Closed maccradar closed 8 years ago
Thanks for the very detailled issue report! That's great!
Would it be possible to also share a (part of) of the recorded trajectory, so that we can possibly turn the issue into a proper unit-test?
Sure! It's actually a published dataset :-) http://its.acfr.usyd.edu.au/datasets/naturalistic-intersection-driving-dataset/ We've been using trajectory set 1 mainly.
I don't test it yet, but a first issue is that the bpymorse.set_speed call is at the end of the builder script. It should be at the beginning, before the creation of the first robot.
a config.json example would help too.
{
"title" : "Replay test",
"environment_speed": "TODO",
"fastmode": "TODO",
"robots" : [
{
"name": "Robot1",
"type": "ATRV",
"csvfile": "intersection_dataset.csv",
"sensors": [
"pose",
"odometry"
],
"plot": true
}
]
}
Changing the location of bypymorse.set_speed has no effect on the spikes.
We've noticed jumps in the Z direction of the ATRV robot when it crosses the X-axis, for no apparent reason. They seem to be happening around the timesteps where we are seeing the spikes in the linear velocity. I assume the axes don't have any thickness which is included in the physics? :-)
Some code are missing to execute the client code (such as read_csv(), but maybe other stuff). Moreover, I don't know exactly what is the content of replay_sim/environments/empty.blend. If it is the same thing than standard empty.blend, you may go out of the "ground" which may lead the atrv to fall a bit, gaining some speed in some direction.
You can try to add
robot.set_no_collision()
robot._bpy_obj.game.lock_location_z = True
We've enlarged the plane in the empty.blend and if you want I'll clean up our test code and commit it here. Will give the no collision a try. Before, when we were using the MotionVW, Morse crashed if you would set no_collision because of the lack of a physics engine.
Thanks, @adegroote ! Your two lines solved our issue! The odometry output now perfectly follows our input. So it seemed the physics engine in combination with the Teleport is introducing strange (unrealistic) behaviour. As long as we don't need any physics, you can consider this issue closed.
Yes, no_collision inhibits all physics, and default setting for VWMotion needs physics to move, so it is the expected behaviour (well, it should report an explicit error instead of crashing).
We use the Teleport actuator to feed Morse 1.3_stable with X,Y and RZ data to replay a recorded trajectory from one of our autonomous vehicles. At the moment, we are using ATRV in Morse with an attached pose sensor and odometry sensor and run it "headless". If we plot the poses from both sensors the match perfectly with the provided input, but the actual velocity outputs from the odometry contain some weird spikes.
Here are some graphs of the recorded trajectory and velocities compared against the odometry sensor in Morse
Here is the builder script:
Here is relevant pymorse code from the client script: