Closed haoqiangyang1998 closed 2 years ago
Are you using C/C++ or Python? Before calling render, you need to create visual geoms using e.g. mjvMakeConnector and then add them to the array of visual geoms in mjvScene.geoms.
@yuvaltassa I am currently drawing the trajectories of the end-effectors by using
mjv_initGeom(test_geom, mjGEOM_SPHERE, size, NULL, NULL, color);
mjv_connector(test_geom, mjGEOM_LINE, 2, traj[i-1], traj[I]);
and the results of trajectories are shown as follows:
what I am curious is, can I assign group
using cpp or in simulate.cc
? the reason why I want to do this is that I want to use the group enable
-> geom enable
buttons to enable/disable (to show/ not to show) the trajectory that I am drawing. (because sometimes too many trajectories might confuse)
No. Groups are used when filling the mjvScene (in mjv_updateScene) to decide what goes in it. I.e. by definition everything in the scene is visible and everything that is not visible is not in the scene. Does this make sense?
For example, I want to watch the trajectory of the end-effector in the
FetchReach-v1
environment during an episode. How can I draw the trajectory in mujoco's popup window?