jros2 conversion - #241
Conversation
There was a problem hiding this comment.
I don't understand this diff.. can we trust it?
| api("us.ihmc:scs2-simulation:source") // TODO Need to fix this, it needs the Robot. | ||
|
|
||
| api("us.ihmc:ihmc-robot-data-logger:0.37.3") | ||
| api("us.ihmc:ihmc-robot-data-logger:source") |
| return "CAPTURE_CARD_MAGEWELL".equals(type) || "Magewell".equals(type); | ||
| } | ||
|
|
||
| static boolean isBlackMagicCamera(Camera camera) | ||
| { | ||
| String type = camera.getTypeAsString(); | ||
| return "CAPTURE_CARD".equals(type) || "Capture Card".equals(type); |
There was a problem hiding this comment.
More magic strings that used to be static fields in messages
There was a problem hiding this comment.
Agreed, can we avoid this?
There was a problem hiding this comment.
We can't avoid this due to the way the logger is designed. It's due to the fact that Camera and CameraType classes are generated from .msg. We do not support enums in this case.
There was a problem hiding this comment.
Can we revert this file change? This method is more confusing and is wrong. Develop was fine for this file
| return "CAPTURE_CARD_MAGEWELL".equals(type) || "Magewell".equals(type); | ||
| } | ||
|
|
||
| static boolean isBlackMagicCamera(Camera camera) | ||
| { | ||
| String type = camera.getTypeAsString(); | ||
| return "CAPTURE_CARD".equals(type) || "Capture Card".equals(type); |
There was a problem hiding this comment.
Agreed, can we avoid this?
| return new FrameRamp3D(referenceFrame, toRamp3D(originPose, ramp3DDefinition)); | ||
| else if (definition instanceof ModelFileGeometryDefinition modelFileGeometryDefinition) | ||
| { | ||
| if (modelFileGeometryDefinition.getFileName() == null || modelFileGeometryDefinition.getFileName().isBlank()) |
There was a problem hiding this comment.
Do we need this? Is this related to this PR?
There was a problem hiding this comment.
I'd like to keep it because it adds safety. I was running into a bunch of exceptions with missing model file names
There was a problem hiding this comment.
Can we do this in a different PR then? What exceptions? Do we get those on develop?
| // For legacy logs we need to check what the batch size is | ||
| int storedBatchSize = logProperties.getVariables().getCompressionBatchSize(); | ||
| batchSize = storedBatchSize <= 0 ? 1 : storedBatchSize; | ||
| long storedBatchSize = logProperties.getVariables().getCompressionBatchSize(); |
There was a problem hiding this comment.
Why don't you just cast to int here
| api("us.ihmc:scs2-simulation:source") // TODO Need to fix this, it needs the Robot. | ||
|
|
||
| api("us.ihmc:ihmc-robot-data-logger:0.37.3") | ||
| api("us.ihmc:ihmc-robot-data-logger:source") |
| return "CAPTURE_CARD_MAGEWELL".equals(type) || "Magewell".equals(type); | ||
| } | ||
|
|
||
| static boolean isBlackMagicCamera(Camera camera) | ||
| { | ||
| String type = camera.getTypeAsString(); | ||
| return "CAPTURE_CARD".equals(type) || "Capture Card".equals(type); |
Summary
Migration from the legacy IHMC ROS 2 stack to jros2.