Skip to content

Robots don't show up in the plots #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AVSoriak opened this issue Mar 20, 2025 · 0 comments
Open

Robots don't show up in the plots #487

AVSoriak opened this issue Mar 20, 2025 · 0 comments

Comments

@AVSoriak
Copy link

Hi, I was creating a simple 3DOF robot using ETS notation and ERobot, then I tried to plot it following what is shown in this example, but there was no robot in the plot. I tried then to recreate the exact code shown in the example, and once again the robot didn't show up in the plot.
Here's the code I wrote:

import numpy as np
import matplotlib.pyplot as plt
import roboticstoolbox as rtb
import roboticstoolbox.robot.ET as ET
from spatialmath.base import *
from spatialmath import SE3, Twist3

l0 = 0.01; l1 = 0.4; l2 = 0.4; l3 = 0.4
e = ET.tz(l0)*ET.Rz()*ET.tz(l1)*ET.Ry()*ET.tx(l2)*ET.Ry()*ET.tx(l3)
print(e)

AleBot = rtb.robot.ERobot(e)
print(AleBot)

T = AleBot.fkine([0.5, 0.5, 0])
print(T)

sol = AleBot.ikine_LM(T)
print(sol)

pyplot = rtb.backends.PyPlot.PyPlot()
pyplot.launch()
pyplot.add(AleBot)
AleBot.q = sol.q
pyplot.step()
pyplot.hold()

OS: Win11 Pro
Python 3.12.3 via virtual environment using Anaconda
Robotics Toolbox ver. 1.1.1
matplotlib 3.9.1
swift-sim 1.1.0
spatialmath 1.1.14

Don't know if I'm doing something wrong or the problem comes from modules incompatibilities; I thank you all in advance for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant