Open yck011522 opened 1 month ago
@ZacZhangzhuo Ping. I'm not familiar with this area of the code, I think you created this?
Also I find that RobotModelObject.update_joints()
does not work, this line throws an error:
https://github.com/compas-dev/compas_robots/blob/6df39febb487cf88ccc6e05bc75e9de8b4972353/src/compas_robots/viewer/scene/robotmodelobject.py#L173
Saying that there is no renderer
.
My Code:
from compas_fab.robots import RobotLibrary
from compas_viewer import Viewer
viewer = Viewer()
robot = RobotLibrary.ur5(load_geometry=True)
model = robot.model
object = viewer.scene.add(model)
# object.update(robot.random_configuration())
object.update_joints(robot.random_configuration())
viewer.show()
update()
function seems to work but I think that doesn't actually update the viewer.self.renderer.update()
, that seems to do the job.Adding @tomvanmele and @Licini to the thread
@gonzalocasas @tomvanmele @Licini ping
I was trying out the
compas_viewer
with compas_fab at some point with the following code: Using latestmain
branch of compas_fab.This won't work and I've traced the problem down to a few lines in this file: \src\compas_robots\viewer\scene\robotmodelobject.py
https://github.com/compas-dev/compas_robots/blob/6df39febb487cf88ccc6e05bc75e9de8b4972353/src/compas_robots/viewer/scene/robotmodelobject.py#L128-L154
I had to change the following lines, I think they are typos.: