Skip to content

RNE method not working for ERobot #489

Open
@vkzimmerman

Description

@vkzimmerman

Describe the bug
I am running into a bug where I am trying to use the rne() function on an inherited ERobot and am getting an error "TypeError: list indices must be integers or slices, not NoneType".

Version information
roboticstoolbox-python version 1.1.1
spatialmath-python version 1.1.13

To Reproduce
Steps to reproduce the behavior:
robot2 = rtb.models.DH.Panda()
print(robot2.rne(q=np.array([-1.64904312,-0.10738241,0.0,0.,0.,0.,0.]),qd=np.array([0.,0.,0.,0.,0.,0.,0.]),qdd=np.array([0.,0.,0.,0.,0.,0.,0.]),gravity=np.array([9.81,0.,0.])))
robot3 = rtb.models.ETS.Panda()
print(robot3.rne(q=np.array([-1.64904312,-0.10738241,0.0,0.,0.,0.,0.]),qd=np.array([0.,0.,0.,0.,0.,0.,0.]),qdd=np.array([0.,0.,0.,0.,0.,0.,0.]),gravity=np.array([9.81,0.,0.])))
robot = rtb.models.URDF.Panda()
print(robot.rne(q=np.array([-1.64904312,-0.10738241,0.0,0.,0.,0.,0.]),qd=np.array([0.,0.,0.,0.,0.,0.,0.]),qdd=np.array([0.,0.,0.,0.,0.,0.,0.]),gravity=np.array([9.81,0.,0.])))

Expected behavior
The expected behavior for the example ERobot rne call should be the same result as the rne call with the DH robot. The code runs an example DH robot, ETS robot, and a URDF Erobot. All three return different results. The ERobot especially causes a code breaking error message which is shown in the screenshot below.

Screenshots

Image

Environment (please complete the following information):
-WSL
-Python 3.10.12

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions