8
8
import us .ihmc .euclid .transform .RigidBodyTransform ;
9
9
import us .ihmc .euclid .tuple3D .Point3D ;
10
10
import us .ihmc .euclid .yawPitchRoll .YawPitchRoll ;
11
+ import us .ihmc .log .LogTools ;
11
12
import us .ihmc .perception .sceneGraph .SceneNode ;
12
13
import us .ihmc .perception .sceneGraph .modification .SceneGraphNodeAddition ;
13
14
import us .ihmc .rdx .perception .sceneGraph .RDXPredefinedRigidBodySceneNode ;
@@ -23,6 +24,8 @@ public class RDXCustomSceneLoader
23
24
{
24
25
public enum RDXDemoScene
25
26
{
27
+ FLAT_GROUND ,
28
+ ROUGH_TERRAIN ,
26
29
EXPLOSIVE_BREACHING_A ,
27
30
EXPLOSIVE_BREACHING_B ,
28
31
EXPLOSIVE_BREACHING_C ,
@@ -191,7 +194,7 @@ public void loadCustomScene(RDXDemoScene demoScene)
191
194
break ;
192
195
193
196
default :
194
- throw new IllegalArgumentException ( "Unknown demo scene: " + demoScene ) ;
197
+ break ;
195
198
}
196
199
}
197
200
@@ -224,6 +227,7 @@ public String getEnvironmentName(RDXDemoScene demoScene)
224
227
{
225
228
case EXPLOSIVE_BREACHING_A -> "BreachingDemoA.json" ;
226
229
case EXPLOSIVE_BREACHING_B -> "BreachingDemoB.json" ;
230
+ case ROUGH_TERRAIN -> "HarderTerrain.json" ;
227
231
default -> "FlatGround.json" ;
228
232
};
229
233
}
@@ -237,7 +241,15 @@ public void trackEnvironment(ArrayList<RDXEnvironmentObject> objects)
237
241
SceneNode sceneNode = sceneNodesMap .get (object .getName () + nodeIndex );
238
242
if (sceneNode != null )
239
243
{
240
- object .setTransformToWorld (sceneNode .getNodeFrame ().getTransformToWorldFrame ());
244
+ try
245
+ {
246
+ object .setTransformToWorld (sceneNode .getNodeFrame ().getTransformToWorldFrame ());
247
+ }
248
+ catch (Exception e )
249
+ {
250
+ // Exception is caught and ignored. We still get some "is not a Rotation matrix" errors
251
+ LogTools .warn ("Not a Rotation Matrix tolerance not met" );
252
+ }
241
253
}
242
254
}
243
255
}
@@ -259,6 +271,7 @@ public void moveManipulatedObject()
259
271
catch (Exception e )
260
272
{
261
273
// Exception is caught and ignored. We still get some "is not a Rotation matrix" errors
274
+ LogTools .warn ("Not a Rotation Matrix tolerance not met" );
262
275
}
263
276
}
264
277
});
0 commit comments