Visualize Robot in Gazebo RoboMaker

0

I'm following the helloworld tutorial for RoboMaker, and when I have to launch the simulation application with the following command:

docker run -it -v /tmp/.X11-unix/:/tmp/.X11-unix/ -u robomaker -e ROBOMAKER_GAZEBO_MASTER_URI=http://localhost:5555 -e ROBOMAKER_ROS_MASTER_URI=http://localhost:11311 \robomaker-helloworld-sim-app:latest roslaunch hello_world_simulation empty_world.launch

it runs the application but it does not open Gazebo in the virtual desktop to visualize the robot. How do I have to change this command?

gefragt vor 2 Jahren402 Aufrufe
1 Antwort
0

Use the following commands to visualize the simulation using the Gazebo GUI tool:

  1. Connect to your container running the simulation application.
  2. Visualize your application by running the Gazebo Graphical User Interface (GUI)
# Enable access to X server to launch Gazebo from docker container
$ xhost +

# Check that the robot_app and sim_app containers are running. The command should list both containers
$ docker container ls

# Connect to the sim app container
$ docker exec -it sim_app bash

# Launch Gazebo from within the container
$ rosrun gazebo_ros gzclient   

For more information, see the documentation on Running a sample application with ROS Melodic and Gazebo 9. (There is also separate documentation for ROS2 Foxy and Gazebo 11).

AWS
EXPERTE
beantwortet vor 2 Jahren
  • Thank you very much! I have got the following two problems:

    • when I run the command $ xhost + the following error appears: xhost: unable to open display ""
    • when I run inside the container $ rosrun gazebo_ros gzclient the following error appears: bash: rosrun: command not found

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen