Align Nav2 with physics time and preserve complete simulation scenes
This commit is contained in:
@@ -67,8 +67,10 @@ def run_pipeline(factory, arguments, directory, incoming, outgoing, stop):
|
||||
if message['pose'] is not None:
|
||||
pose, speed, stamp = message['pose']
|
||||
twist = message['twist']
|
||||
simulated = message['pose_simulation_time']
|
||||
pipeline.observe_pose(pose, speed, stamp, measured_twist=(
|
||||
twist[0] if twist is not None and twist[1] == stamp else None))
|
||||
twist[0] if twist is not None and twist[1] == stamp else None),
|
||||
simulation_time_ns=simulated[0] if simulated is not None and simulated[1] == stamp else None)
|
||||
packet = message['sensor']
|
||||
if packet is not None and packet[0] == pipeline.epoch:
|
||||
_, frame, observation = packet
|
||||
@@ -137,6 +139,7 @@ class ProcessPipeline(ContinuousPipeline):
|
||||
identity = self.sensor[:2] if self.sensor is not None else None
|
||||
message = dict(epoch=self.epoch, enabled=self.enabled, pose=self.pose,
|
||||
twist=getattr(self, 'pose_twist', None),
|
||||
pose_simulation_time=getattr(self, 'pose_simulation_time', None),
|
||||
sensor=self.sensor if identity != sent_sensor else None)
|
||||
try:
|
||||
self.incoming.put(message, timeout=.05)
|
||||
|
||||
Reference in New Issue
Block a user