Skip to content

The sys encoding method change to ASCII after calling curobo.types.math.Pose twice  #452

Open
@shockstove

Description

@shockstove

If it’s not a bug, please use discussions: https://github.com/NVlabs/curobo/discussions

Please provide the below information in addition to your issue:

  1. cuRobo installation mode (choose from [python, isaac sim, docker python, docker isaac sim]):python
  2. python version:3.10
  3. Isaac Sim version (if using): None

Issue Details

Hi,I have encountered a very confusing problem when I import MotionGen,here is the description:
After I import MotionGen, I found that the encoding type has changed from utf-8 to ANSI-X3.4-1968,which means ASCII.then I found the func plan_grasp has three parameters
grasp_approach_offset: Pose = Pose.from_list([0, 0, -0.15, 1, 0, 0, 0]), grasp_approach_path_constraint: Union[None, List[float]] = [0.1, 0.1, 0.1, 0.1, 0.1, 0.0], retract_offset: Pose = Pose.from_list([0, 0, -0.15, 1, 0, 0, 0]),
when these parameters exist, after importing this func, the encoding method will be changed.

Testing process:

from curobo.types.math import Pose
import locale
print(locale.getpreferredencoding())
grasp_approach_offset= Pose.from_list([0, 0, -0.15, 1, 0, 0, 0]),
print(locale.getpreferredencoding())
retract_offset= Pose.from_list([0, 1, -0.15, 1, 0, 0, 0]),
print(locale.getpreferredencoding())
grasp_approach_path_constraint= [0.1, 0.1, 0.1, 0.1, 0.1, 0.0],
print(locale.getpreferredencoding())
retract_offset= Pose.from_list([0, 1, -0.15, 1, 0, 0, 0]),
print(locale.getpreferredencoding())

and the output is

UTF-8
UTF-8
ANSI_X3.4-1968
ANSI_X3.4-1968
ANSI_X3.4-1968

that means once I call Pose.from_list() twice, the encoding type will change from default "utf-8" to “ascii", this is a very interesting and confusing phenomenon, and I am not sure if it is due to the setting of my personal environment or if it is a common phenomenon.If you could provide some help, I would be extremely grateful.

Best Wishs!

Metadata

Metadata

Assignees

Labels

cannot_reproduceNot sure if it's a bug as it cannot be reproduced by developers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions