rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
693 stars 343 forks source link

Replace Unit with UnitInfo object #1271

Closed LLipter closed 1 year ago

LLipter commented 1 year ago

This pull request replaces unit in the environment with UnitInfo object. It also updates all related python bindings.

rdiankov commented 1 year ago

@LLipter there was a point in UpdateFromInfo that was assigning _unit in production, which I just changed to check and throw an exception. can you do the same in this branch and test? Thanks

LLipter commented 1 year ago

@rdiankov Sure, I also update my MR on webstack to throw an error in this situation

rdiankov commented 1 year ago

@LLipter did you actually test, this simple scene fails:

{
  "bodies":[{
    "name":"C",
    "links":[{
      "name":"L",
      "geometries":[{
        "name":"G",
        "type":"cylinder",
        "radius":1,
        "height":1
      }]
    }]
  }],
  "unitInfo": {
    "lengthUnit":"mm"
  }
}
rdiankov commented 1 year ago

thanks~