question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Camera Views

See original GitHub issue

Hello,

Thank you for the excellent code.

I’m trying to use the setup to collect simulated RGB data for a project but I haven’t been able to find a way to set custom camera angle while rendering. All I can see is some predefined modes like topview. Anyway I can setup custom camera views for the tasks?

Thanks!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
activatedgeekcommented, Dec 30, 2019

Here’s a tiny hack meanwhile.

I modified viewer_setup() method in mujoco_env.py with the following statements

...

def viewer_setup(self):
  self.viewer.cam.azimuth = -20
  self.viewer.cam.elevation = -20

...

Gets you this perspective sawyer_push

2reactions
karttikeyacommented, Jan 21, 2020

Yes, modifying the viewer_setup() api does the trick. In my case (headless remote server, No GLFW) to use env.sim.render instead of env.render using the following snippet to directly create and adjust the viewer

env.viewer = mujoco_py.MjRenderContextOffscreen(env.sim, -1) 
env.viewer.cam.azimuth =  205
env.viewer.cam.elevation = -170
env.viewer.cam.distance = 2.3
env.viewer.cam.lookat[0] = 1.1
env.viewer.cam.lookat[1] = 1.1 
env.viewer.cam.lookat[2] = -0.1

renders a nice GIF-esque angle.

image

On a related note, would there be a way to render this “effector ghost”, ie same as usual except without the sawyer arm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSFS | QuickFix Series | Create Custom Camera Views (4K)
Hey guys,In this latest video of our MSFS QuickFix Series, GibboIreland shows us how to create Custom Camera Views in Microsoft Flight ...
Read more >
How to set up wing views & custom camera views in Flight ...
This is a short tutorial explaining how to create custom camera views within Microsoft Flight Simulator, in the same style they are in ......
Read more >
AWESOME Custom Camera views for EVERY SINGLE MSFS ...
Microsoft Flight Simulator's freeware gets more interesting and useful by the day. Custom camera mod has been the showcased mod today.
Read more >
How to configure Cockpit Views / Cameras using Custom ...
Open the controls menu and add shortcuts of the numpad for all created custom camera views as shown in the screenshot below. ·...
Read more >
Custom Camera Views - FlyByWire Simulations Documentation
The FlyByWire A32NX comes with some built in pre-configured custom camera views. This guide will give an overview over the custom camera views...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found