unitree-go2-ros2 icon indicating copy to clipboard operation
unitree-go2-ros2 copied to clipboard

Spawn robot in a new world

Open edugm94 opened this issue 8 months ago • 1 comments
trafficstars

Hello,

I have installed correctly the package. I could spawn the robot in an empty world in gazebo. I tried to execute this command: ros2 launch go2_config gazebo.launch.py rviz:=true world:=worlds/outdoor.world , to spawn the robot model in a different virtual environment, but it did not work out.

How is it possible to spawn the robot in a different environment?

Thanks for any support.

Best regards, Eduardo

edugm94 avatar Feb 24 '25 14:02 edugm94

Check the following:

  • Check the reference world in the worlds directory.
  • Try first opening the world using gazebo <world_file> --verbose
  • Try rebuilding the workspace and launch again.

anujjain-dev avatar Feb 26 '25 17:02 anujjain-dev

it could seem that gazebo is stuck loading the map, it just needs a lot of time to load, so wait and it will come out sooner or later, i've used this command: ros2 launch go2_config gazebo.launch.py world:=$(ros2 pkg prefix go2_config)/share/go2_config/worlds/outdoor.world

MattiaGrigoli avatar Jul 19 '25 15:07 MattiaGrigoli

I did fix it. Thanks for the responses! :)

edugm94 avatar Jul 21 '25 08:07 edugm94

@edugm94 may I know how you did it? thank you!

PushpakAg avatar Aug 22 '25 13:08 PushpakAg

@edugm94 may I know how you did it? thank you!

Hi,

I just modified the launch file and add the path to the .world file.

edugm94 avatar Aug 22 '25 14:08 edugm94