We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd27f5d + a667562 commit 574bd9eCopy full SHA for 574bd9e
src/prpy/clone.py
@@ -186,6 +186,13 @@ def Cloned(*instances, **kwargs):
186
clone_instances = list()
187
188
for instance in instances:
189
+ # Check if an instance is `NoneType`.
190
+ # If it is, it remains NoneType in the cloned environment.
191
+ if instance is None:
192
+ clone_instances.append(None)
193
+ continue
194
+
195
+ # Clone each instance based on its type.
196
if isinstance(instance, openravepy.Robot):
197
clone_instance = clone_env.GetRobot(instance.GetName())
198
elif isinstance(instance, openravepy.KinBody):
0 commit comments