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?

질문됨 2년 전402회 조회
1개 답변
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
전문가
답변함 2년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠