Don't add an empty "user" attribute to user sensors.
This fixes the broken TAP tests. PiperOrigin-RevId: 495867491 Change-Id: I740651ed0dd8d1c84053a48f3fca577b6024bf95
This commit is contained in:
committed by
Copybara-Service
parent
f70403d00a
commit
189349f421
@@ -32,8 +32,10 @@ public class MjUserSensor : MjBaseSensor {
|
||||
var mjcf = doc.CreateElement("user");
|
||||
mjcf.SetAttribute("name", Name);
|
||||
mjcf.SetAttribute("dim", $"{Dimension}");
|
||||
// TODO: add validation that UserData is a space-separated list of floating numbers?
|
||||
mjcf.SetAttribute("user", UserData);
|
||||
if (!String.IsNullOrEmpty(UserData)) {
|
||||
// TODO: add validation that UserData is a space-separated list of floating numbers?
|
||||
mjcf.SetAttribute("user", UserData);
|
||||
}
|
||||
return mjcf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user