Visualize Robot in Gazebo RoboMaker
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?
Use the following commands to visualize the simulation using the Gazebo GUI tool:
- Connect to your container running the simulation application.
- 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).
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
Error while visualizing simulation application in Gazebo
Custom package not found when running simulation applicationAccepted Answerasked 3 years ago
Building container applicationAccepted Answerasked a month ago
bash: rosrun: command not found RoboMaker
Deploying my application as colcon bundle, is the source code hidden?asked 3 months ago
Adding a new model to RoboMakerAccepted Answerasked 2 years ago
Robomaker doesn't push docker images into ECRAccepted Answerasked 24 days ago
Visualize Robot in Gazebo RoboMakerasked 10 days ago
[RoboMaker] Where to get ROBOMAKER_ROBOT_APP_IP and ROBOMAKER_SIM_APP_IP when running a simulation job with imagesasked 3 months ago
Policies needed for creating and writing files in simulation applicationAccepted Answerasked 2 years ago