facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.63k stars 421 forks source link

Adding camera to an agent(loaded via URDF) #1020

Closed sasayesh closed 3 years ago

sasayesh commented 3 years ago

❓ Questions and Help

Hello, I am trying to import a robotic arm via URDF. I followed the URDF tutorial and I can control it using my custom controller. It would be appreciated to give me a pointer on how I can attach a camera to the robot(similar to embodied agent). Does current implementation accept camera node definition in URDF?

Thank you! @msavva @eundersander @aclegg3

aclegg3 commented 3 years ago

Currently this is not supported in the articulated object prototype. There is ongoing development on the Habitat Sensor API to support general attachment to arbitrary SceneNodes of choice. Once this is complete you should be able to manually attach your sensors to the SceneNode for a link. We are looking into a URDF sensor API as well, but this is work in progress at this time.

sasayesh commented 3 years ago

Thanks for the update. What if I import the robot, not through URDF parser. I am thinking about something like LOCOBOT. Could you please show me the starting point or previous implementations for LOCOBOT?

aclegg3 commented 3 years ago

For a recent discussion on URDF Locobot examples, see issue #974.

If you want to control the agent on the NavMesh (velocity or position control without wheel dynamics) you can checkout some of our tutorials particularly the "Habitat-Sim Basics for Navigation" and "Habitat-Sim for Interaction" topics.

You can also manually sync the sensors to the transform of a particular URDF link by using the get_articulated_link_rigid_state function and setting the transformation of the agent or camera SceneNode manually at each frame. An example of manual camera transformation can be found in the "Advanced Topic : Motion Tracking Camera" example in the "Habitat-Sim Advanced Topics" tutorial topic.