@@ -88,21 +88,28 @@ def on_pre_udpate_cb(_info, _ecm):
88
88
self .assertEqual (0 , link .world_kinetic_energy (_ecm ))
89
89
link .enable_velocity_checks (_ecm , False )
90
90
link .enable_acceleration_checks (_ecm , False )
91
- # Axis Aligned Box Test
92
- link .enable_bounding_box_checks (_ecm , True )
91
+ # Compute Axis Aligned Box Test
93
92
# Offset of 0.5 meters along z-axis
93
+ self .assertEqual (
94
+ AxisAlignedBox (Vector3d (- 0.5 , - 0.5 , 0 ), Vector3d (0.5 , 0.5 , 1 )),
95
+ link .compute_axis_aligned_box (_ecm )
96
+ )
97
+ # Axis Aligned Box Test with disabled bounding box checks
98
+ link .enable_bounding_box_checks (_ecm , False )
99
+ self .assertEqual (None , link .axis_aligned_box (_ecm ))
100
+ self .assertEqual (None , link .world_axis_aligned_box (_ecm ))
101
+ # Axis Aligned Box Test with enabled bounding box checks
102
+ link .enable_bounding_box_checks (_ecm , True )
94
103
self .assertEqual (
95
104
AxisAlignedBox (Vector3d (- 0.5 , - 0.5 , 0 ), Vector3d (0.5 , 0.5 , 1 )),
96
105
link .axis_aligned_box (_ecm )
97
106
)
98
- # World Axis Aligned Box Test
99
- # Same as above since the link is at the origin
107
+ # Same as above since the link is at the world origin
100
108
self .assertEqual (
101
109
AxisAlignedBox (Vector3d (- 0.5 , - 0.5 , 0 ), Vector3d (0.5 , 0.5 , 1 )),
102
110
link .world_axis_aligned_box (_ecm )
103
111
)
104
112
105
-
106
113
def on_udpate_cb (_info , _ecm ):
107
114
self .iterations += 1
108
115
0 commit comments