softbankrobotics-research / qibullet

Bullet simulation for SoftBank Robotics robots
Apache License 2.0
143 stars 38 forks source link

IP address of a virtual robot #33

Closed bornaZbodulja closed 4 years ago

bornaZbodulja commented 4 years ago

Hi, I'm doing some research regarding navigation solutions for pepper robot. . Because of the current situation I'm not able to work on a real robot so I'm using qibullet as my simulator. I'm trying to use https://github.com/LCAS/spqrel_navigation but for that I need robots ip address. So, my question is does the simulated robot have some kind of an ip address?

Thanks

mbusy commented 4 years ago

Hi, The simulated robot doesn't have any ip address.

Regarding the SPQREL navigation stack, if they directly use NAOqi to communicate with the robot, I'm afraid that you won't have any easy way to interface the navigation stack with the simulator.

If they use ROS to communicate with the robot (more specifically the packages of the ros-naoqi stack, such as naoqi_driver), you can follow the qiBullet ROS tutorial, explaining how to use a qiBullet ROS wrapper. Running a qiBullet virtual robot + a qiBullet ROS wrapper will be equivalent to using a real robot and the ros-naoqi stack, and you won't need any IP address to launch that.

mbusy commented 4 years ago

@bornaZbodulja, any updates on this issue ?

bornaZbodulja commented 4 years ago

The navigation via ROS nav stack works fine in simulator, but I wasn't able to use spqrel in simulator because it does not use ROS to communicate with the robot, and I didn't dig into it deeper but is it possible to use gazebo world files in qibullet, because I already have pre built maps of environments in gazebo ?

mbusy commented 4 years ago

If they don't use ROS, you'll have to replace the qi calls by qiBullet ones (suppressing the need for an IP address).

Regarding the second part of your question, to spawn elements in the simulation you need to use the PyBullet API, and more specifically one (or more) of the following methods:

If I'm not mistaken, Gazebo worlds are defined in the sdf format, so you could theoretically call the loadSDF method on your world file. But I'm not sure that this will yield much results, since the syntax of the world file a bit specific to Gazebo. You might have to individually spawn your components using the aforementioned methods. Some additional documentation, the PyBullet documentation, a snippet calling the loadURDF method, and a snippet calling the loadSDF method.

We've gone a bit off tracks, I'm going to close this issue for now. Feel free to open a new one if you have additional questions about the simulator