[Solved] Panther-Gazebo simulation with Docker

I am writing this regarding the Gazebo simulation of the Panther robot. I was not able to run it in Docker. I saw that the simulation might only work on AMD laptops with MacBook and ARM architecture. Is that a problem?

I tried these:

I am looking forward to your response!

Hello @Ton_Hoang_Nguyen and welcome to Husarion Community!

Can you please elaborate on what it means that it doesn’t work in Docker? Any terminal logs, errors, messages?

Best regards
Jan Brzyk

Thank you and happy to be hear!

This is what I got when running docker-compose up:

base) billtonhoang@BillTonHoangs-MacBook-Pro simulation %   docker compose -f compose.simulation.yaml up
[+] Running 1/0
 ⠋ Container panther_gazebo                                                                  [+] Running 2/2                                                     Recreate0.1s 
 ✔ Container panther_gazebo                                                                                                                                      Recreated0.1s 
 ! panther_gazebo The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s 
Attaching to panther_gazebo
panther_gazebo  | [INFO] [launch]: All log files can be found below /root/.ros/log/2024-03-11-22-16-58-532720-docker-desktop-1
panther_gazebo  | [INFO] [launch]: Default logging verbosity is set to INFO
panther_gazebo  | [INFO] [ruby $(which ign) gazebo-1]: process started with pid [137]
panther_gazebo  | [INFO] [parameter_bridge-2]: process started with pid [141]
panther_gazebo  | [INFO] [create-3]: process started with pid [145]
panther_gazebo  | [INFO] [robot_state_publisher-4]: process started with pid [149]
panther_gazebo  | [INFO] [spawner-5]: process started with pid [156]
panther_gazebo  | [INFO] [ekf_node-6]: process started with pid [160]
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.031426504] [robot_state_publisher]: got segment base_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.041102337] [robot_state_publisher]: got segment body_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.042553170] [robot_state_publisher]: got segment cover_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.043109004] [robot_state_publisher]: got segment fl_wheel_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.043628379] [robot_state_publisher]: got segment fr_wheel_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.043814670] [robot_state_publisher]: got segment front_bumper_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.044047587] [robot_state_publisher]: got segment front_light_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.044557920] [robot_state_publisher]: got segment imu_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.044719754] [robot_state_publisher]: got segment rear_bumper_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.044812129] [robot_state_publisher]: got segment rear_light_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.044977545] [robot_state_publisher]: got segment rl_wheel_link
panther_gazebo  | [robot_state_publisher-4] [INFO] [1710195425.045109920] [robot_state_publisher]: got segment rr_wheel_link
panther_gazebo  | [create-3] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [create-3] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [create-3] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [create-3] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [create-3] Did you set the environment variable IGN_IP with a correct IP address? 
panther_gazebo  | [create-3]   [172.18.0.1] seems an invalid local IP address.
panther_gazebo  | [create-3]   Using 127.0.0.1 as hostname.
panther_gazebo  | [create-3] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [create-3] terminate called after throwing an instance of 'std::out_of_range'
panther_gazebo  | [create-3]   what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
panther_gazebo  | [create-3] qemu: uncaught target signal 6 (Aborted) - core dumped
panther_gazebo  | [ERROR] [create-3]: process has died [pid 145, exit code -6, cmd '/opt/ros/humble/lib/ros_gz_sim/create -name panther -allow_renaming true -topic robot_description -x 5.0 -y -5.0 -z 0.2 -Y 0.0 --ros-args -p use_sim_time:=True'].
panther_gazebo  | [parameter_bridge-2] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [parameter_bridge-2] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [parameter_bridge-2] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [parameter_bridge-2] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [parameter_bridge-2] Did you set the environment variable IGN_IP with a correct IP address? 
panther_gazebo  | [parameter_bridge-2]   [172.18.0.1] seems an invalid local IP address.
panther_gazebo  | [parameter_bridge-2]   Using 127.0.0.1 as hostname.
panther_gazebo  | [parameter_bridge-2] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [parameter_bridge-2] terminate called after throwing an instance of 'std::out_of_range'
panther_gazebo  | [parameter_bridge-2]   what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
panther_gazebo  | [parameter_bridge-2] qemu: uncaught target signal 6 (Aborted) - core dumped
panther_gazebo  | [ERROR] [parameter_bridge-2]: process has died [pid 141, exit code -6, cmd '/opt/ros/humble/lib/ros_gz_bridge/parameter_bridge --ros-args -r __node:=gz_bridge -p use_sim_time:=True --params-file /tmp/launch_params_r8_67xe6'].
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Did you set the environment variable IGN_IP with a correct IP address? 
panther_gazebo  | [ruby $(which ign) gazebo-1]   [172.18.0.1] seems an invalid local IP address.
panther_gazebo  | [ruby $(which ign) gazebo-1]   Using 127.0.0.1 as hostname.
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] terminate called after throwing an instance of 'std::out_of_range'
panther_gazebo  | [ruby $(which ign) gazebo-1]   what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
panther_gazebo  | [ruby $(which ign) gazebo-1] Stack trace (most recent call last):
panther_gazebo  | [ruby $(which ign) gazebo-1] #31   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001bf7d8f, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #30   Object "ign gazebo server", at 0x400000117e, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #29   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001901e19, in ruby_run_node
panther_gazebo  | [ruby $(which ign) gazebo-1] #28   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40018fe317, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #27   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a9330c, in rb_vm_exec
panther_gazebo  | [ruby $(which ign) gazebo-1] #26   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8dc96, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #25   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8afc5, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #24   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a88c34, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #23   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40019d4a1e, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #22   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40018ff9ac, in rb_protect
panther_gazebo  | [ruby $(which ign) gazebo-1] #21   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a97c61, in rb_yield
panther_gazebo  | [ruby $(which ign) gazebo-1] #20   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a9330c, in rb_vm_exec
panther_gazebo  | [ruby $(which ign) gazebo-1] #19   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8dc96, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #18   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8afc5, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #17   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a88c34, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #16   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x400566544b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #15   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a56088, in rb_nogvl
panther_gazebo  | [ruby $(which ign) gazebo-1] #14   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x4005664d6b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #13   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x4005685492, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #12   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x4005688e2d, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #11   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-ign.so.6.15.0", at 0x4006135d8e, in runServer
panther_gazebo  | [ruby $(which ign) gazebo-1] #10   Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x4006924f8f, in ignition::transport::v11::Node::Node(ignition::transport::v11::NodeOptions const&)
panther_gazebo  | [ruby $(which ign) gazebo-1] #9    Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x400691034e, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #8    Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x400693c835, in ignition::transport::v11::NodeShared::NodeShared()
panther_gazebo  | [ruby $(which ign) gazebo-1] #7    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40057524cc, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #6    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b4d7, in __cxa_throw
panther_gazebo  | [ruby $(which ign) gazebo-1] #5    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b276, in std::terminate()
panther_gazebo  | [ruby $(which ign) gazebo-1] #4    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b20b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #3    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400574fb9d, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).#2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001bf67f2, in abort
panther_gazebo  | [ruby $(which ign) gazebo-1] #1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001c10475, in raise
panther_gazebo  | [ruby $(which ign) gazebo-1] #0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001c649fc, in pthread_kill
panther_gazebo  | [ruby $(which ign) gazebo-1] 
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Did you set the environment variable IGN_IP with a correct IP address? 
panther_gazebo  | [ruby $(which ign) gazebo-1]   [172.18.0.1] seems an invalid local IP address.
panther_gazebo  | [ruby $(which ign) gazebo-1]   Using 127.0.0.1 as hostname.
panther_gazebo  | [ruby $(which ign) gazebo-1] Error setting socket option (IP_MULTICAST_IF).
panther_gazebo  | [ruby $(which ign) gazebo-1] Aborted (Signal sent by tkill() 214 0)
panther_gazebo  | [ruby $(which ign) gazebo-1] qemu: uncaught target signal 6 (Aborted) - core dumped
panther_gazebo  | [ruby $(which ign) gazebo-1] terminate called after throwing an instance of 'std::out_of_range'
panther_gazebo  | [ruby $(which ign) gazebo-1]   what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
panther_gazebo  | [ruby $(which ign) gazebo-1] Stack trace (most recent call last):
panther_gazebo  | [ruby $(which ign) gazebo-1] #31   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001901e19, in ruby_run_node
panther_gazebo  | [ruby $(which ign) gazebo-1] #30   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40018fe317, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #29   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a9330c, in rb_vm_exec
panther_gazebo  | [ruby $(which ign) gazebo-1] #28   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8dc96, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #27   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8afc5, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #26   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a88c34, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #25   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40019d4a1e, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #24   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x40018ff9ac, in rb_protect
panther_gazebo  | [ruby $(which ign) gazebo-1] #23   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a97c61, in rb_yield
panther_gazebo  | [ruby $(which ign) gazebo-1] #22   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a9330c, in rb_vm_exec
panther_gazebo  | [ruby $(which ign) gazebo-1] #21   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8dc96, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #20   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a8afc5, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #19   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a88c34, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #18   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x400566544b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #17   Object "/lib/x86_64-linux-gnu/libruby-3.0.so.3.0", at 0x4001a56088, in rb_nogvl
panther_gazebo  | [ruby $(which ign) gazebo-1] #16   Object "/usr/lib/x86_64-linux-gnu/ruby/3.0.0/fiddle.so", at 0x4005664d6b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #15   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x4005685492, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #14   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x4005688e2d, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #13   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo6-ign.so.6.15.0", at 0x400613286c, in runGui
panther_gazebo  | [ruby $(which ign) gazebo-1] #12   Object "/lib/x86_64-linux-gnu/libignition-gazebo6-gui.so.6", at 0x40062125b7, in ignition::gazebo::v6::gui::runGui(int&, char**, char const*, char const*, int, char const*)
panther_gazebo  | [ruby $(which ign) gazebo-1] #11   Object "/lib/x86_64-linux-gnu/libignition-gazebo6-gui.so.6", at 0x400621022b, in ignition::gazebo::v6::gui::createGui(int&, char**, char const*, char const*, bool, char const*, int, char const*)
panther_gazebo  | [ruby $(which ign) gazebo-1] #10   Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x4006924f8f, in ignition::transport::v11::Node::Node(ignition::transport::v11::NodeOptions const&)
panther_gazebo  | [ruby $(which ign) gazebo-1] #9    Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x400691034e, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #8    Object "/lib/x86_64-linux-gnu/libignition-transport11.so.11", at 0x400693c835, in ignition::transport::v11::NodeShared::NodeShared()
panther_gazebo  | [ruby $(which ign) gazebo-1] #7    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x40057524cc, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #6    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b4d7, in __cxa_throw
panther_gazebo  | [ruby $(which ign) gazebo-1] #5    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b276, in std::terminate()
panther_gazebo  | [ruby $(which ign) gazebo-1] #4    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400575b20b, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #3    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x400574fb9d, in 
panther_gazebo  | [ruby $(which ign) gazebo-1] #2    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001bf67f2, in abort
panther_gazebo  | [ruby $(which ign) gazebo-1] #1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001c10475, in raise
panther_gazebo  | [ruby $(which ign) gazebo-1] #0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x4001c649fc, in pthread_kill
panther_gazebo  | [ruby $(which ign) gazebo-1] Aborted (Signal sent by tkill() 216 0)
panther_gazebo  | [ruby $(which ign) gazebo-1] qemu: uncaught target signal 6 (Aborted) - core dumped
panther_gazebo  | [INFO] [ruby $(which ign) gazebo-1]: process has finished cleanly [pid 137]
panther_gazebo  | [spawner-5] [INFO] [1710195429.887016631] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist
panther_gazebo  | [spawner-5] [INFO] [1710195432.054424924] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist

and this is my .env.cpu:

DISPLAY=:0
LIBGL_ALWAYS_SOFTWARE=1 # comment if you want to use CPU for rendering
QT_X11_NO_MITSHM=1

I don’t see the simulation and windows opening. I might have missed something.

Hello @Ton_Hoang_Nguyen,

As you can see it’s development version and for this day we do not have any stable image released.
A working version should be available in April, so please wait. For this day if you’d like to run panther simulation you need to change image husarion/panther-gazebo:humble in compose.simulation.yaml to husarion/panther-gazebo:humble-ros2-devel.

Regards

1 Like

Alright, I got it! Thanks for your answer, I will try to do run it and give an update.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.