Skip to content

can't print the robot if symbolic is enabled #222

@asmwarrior

Description

@asmwarrior

Hi, I'm using the github version of both robotics-toolbox-python, spatialgeometry, spatialmath-python, swift.

Now, run the such code:

import roboticstoolbox as rtb
puma = rtb.models.DH.Puma560(symbolic=True)
print(puma)

I got such error:

runfile('E:/code/robotics/robotics-toolbox-python/tests/test_1.py', wdir='E:/code/robotics/robotics-toolbox-python/tests')
Traceback (most recent call last):

  File "E:\code\robotics\robotics-toolbox-python\tests\test_1.py", line 14, in <module>
    print(puma)

  File "e:\code\robotics\robotics-toolbox-python\roboticstoolbox\robot\DHRobot.py", line 252, in __str__
    s += self.configurations_str()

  File "e:\code\robotics\robotics-toolbox-python\roboticstoolbox\robot\Robot.py", line 408, in configurations_str
    qlist.append(angle(q[j], "{: .3g}"))

  File "e:\code\robotics\robotics-toolbox-python\roboticstoolbox\robot\Robot.py", line 389, in angle
    return fmt.format(theta * deg) + "\u00b0"

TypeError: unsupported format string passed to Mul.__format__


Can you fix this? Thanks.

Metadata

Metadata

Assignees

Labels

bugwe got it wrong, will fix

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions