Closed marcopremigit closed 2 years ago
https://github.com/ericchen321/ros_x_habitat/blob/master/src/sims/habitat_physics_simulator.py#L316 an example for you. Once you have the Habitat-sim Env running, you can query the agent state via this method. If you wish to make agent position and rotation values accessible through ROS, simply publish such info to a topic. https://github.com/ericchen321/ros_x_habitat/blob/master/src/nodes/habitat_env_node.py has examples of pushing sensory data to ROS topics.
@yhymason After setting up the Habitat-sim Env with the tutorial you provided, I've made another python script with:
agent_state = HabitatPhysicsSim(PhysicsSimulator, Simulator).get_agent_state()
, but this line creates a
Segmentation error (core dump)
error.
@marcopremigit you are using the Sim in the wrong way, https://github.com/ericchen321/ros_x_habitat/blob/master/src/scripts/eval_habitat_ros.py#L62 gives you a good example of how we are launching the interface as a whole. You will need to pass configs in order to initialize a Sim. Or even simpler, if you just want to play with Habitat-sim, here's how: https://aihabitat.org/tutorial/2020/ and take a look at Habitat-Sim Basics for Navigation
. The classes we built here are inherited from Habitat-sim classes.
Thank you very much!
Hi everyone and thanks for your work! I'm trying to use your code with "Navigating ROS Agent in Habitat Sim". My question is: how can I obtain the position and orientation of the robot in this setting?