Observation returns a wrong speed when using the TargetPose action
See original GitHub issueBUG REPORT
High Level Description Observation returns a wrong speed when using the TargetPose action
SMARTS version 0.6.1
Error logs and screenshots
The observation returned after env.reset()
EgoVehicleObservation(id='Agent-007-bc8960a9', position=array([7.47708956, 3.26770852, 0. ]), bounding_box=Dimensions(length=3.68, width=1.47, height=1.4), heading=Heading(-1.1701719399255746), speed=13.89, steering=None, yaw_rate=None, road_id='gneE6', lane_id='gneE6_0', lane_index=0, mission=Mission(start=Start(position=Point(x=9.171394071277605, y=3.9852963125411036, z=0), heading=Heading(-1.1701719399255746), from_front_bumper=True), goal=PositionalGoal(position=Point(x=197.449999, y=27.22, z=0), radius=2), route_vias=(), start_time=15, entry_tactic=TrapEntryTactic(wait_to_hijack_limit_s=0, zone=None, exclusion_prefixes=(), default_entry_speed=None), via=(), vehicle_spec=None), linear_velocity=array([12.79015739, 5.41700784, 0. ]), angular_velocity=array([0., 0., 0.]), linear_acceleration=array([0., 0., 0.]), angular_acceleration=array([0., 0., 0.]), linear_jerk=array([0., 0., 0.]), angular_jerk=array([0., 0., 0.]), lane_position=RefLinePoint(s=8.159999999999998, t=1.2560739669470201e-15, h=0))
When I give a target pose (8.67448616438762, 3.7747518366590413, -1.169653399002402, 0.1)
and call env.step()
, the observation becomes
EgoVehicleObservation(id='Agent-007-bc8960a9', position=array([8.67448616, 3.77475184, 0. ]), bounding_box=Dimensions(length=3.68, width=1.47, height=1.4), heading=Heading(-1.169653399002402), speed=1.7554420907082715, steering=None, yaw_rate=0.005185409231724947, road_id='gneE6', lane_id='gneE6_0', lane_index=0, mission=Mission(start=Start(position=Point(x=9.171394071277605, y=3.9852963125411036, z=0), heading=Heading(-1.1701719399255746), from_front_bumper=True), goal=PositionalGoal(position=Point(x=197.449999, y=27.22, z=0), radius=2), route_vias=(), start_time=15, entry_tactic=TrapEntryTactic(wait_to_hijack_limit_s=0, zone=None, exclusion_prefixes=(), default_entry_speed=None), via=(), vehicle_spec=None), linear_velocity=array([1.61608687, 0.68544887, 0. ]), angular_velocity=array([-0.00202351, 0.00477429, 0. ]), linear_acceleration=array([-111.74070517, -47.3155897 , 0. ]), angular_acceleration=array([-0.02023513, 0.04774292, 0. ]), linear_jerk=array([0., 0., 0.]), angular_jerk=array([0., 0., 0.]), lane_position=RefLinePoint(s=9.46032747199512, t=-8.228645430406205e-05, h=0))
The speed is wrong because based on the difference of position and time delta (0.1s), the speed should be around 13.8 m/s instead of 1.75 m/s.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top GitHub Comments
Yeah, it works well now. Thank you so much for your help!
@MCZhi Fix has been merged in.