-
Notifications
You must be signed in to change notification settings - Fork 29
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
Added graph rendering, Actuator force visualization[no sites], Sim reset method(backspace) and window positioning #23
base: main
Are you sure you want to change the base?
Conversation
Hi @rohit-kumar-j thanks for the PR. |
Not as of now. I was hoping to ask for suggestions for that. We need the position and orientation of the joint at which point we need to render the force arrow. Asked for the same. However, getting the orientation in |
@rohanpsingh, created force rendering without sites. inputs: [Tested only for hinge and slide joints] f_render_list = [
# fmt: ["jnt_name", "actuator_name", "label_name"]
["hinge_1", "pos_servo_1", "force_at_hinge_1"],
["hinge_2", "pos_servo_2", "force_at_hinge_2"],
["hinge_3", "pos_servo_3", "force_at_hinge_3"],
]
viewer.show_actuator_forces(
f_render_list=f_render_list,
show_force_labels=True
rgba_list=[1, 0.5, 1, 0.5], # common color
force_scale=0.05, # common arrow length scale
arrow_radius=0.05, # common arrow radius
show_force_labels=True, # Needs to be true for showing the labels and the force values
) mujoco_actuator_force_rendering_python.mp4PS: Do not use all the force rendering labels simultaneously if your robot has many actuators. The simulation will run very slow. (You can show the arrows, but not the labels and values) |
Added sim reset method with mujoco_reload_method.mp4 |
@rohanpsingh, is the default window_positioning (top left of screen) too much in the |
Graph preview (KEY: G)
Unfortunately, the time at the bottom of the graph was not recorded in the video. It gives a time-based graph
The red line is a random signal(sine in this case)
mujoco_graph_vis.mp4
Actuator Force visualization via graphs
The sites are used to get the location and orientation of the body at the actuator location only.
mujoco_actuator_vis.mp4
... and added examples