Skip to content

How to use go1.urdf to simulate input topics #8

@Combuster54

Description

@Combuster54

Hi. I was trying to test this algorithm, but I can't have any source. I thought I can use the go1.urdf to do this in gazebo11, but I wasn't able to spawn the model.

root@a41bb57318f9:~/muse_ws/muse_ws# rosrun gazebo_ros spawn_model -urdf   -file /root/muse_ws/muse_ws/src/state_estimator/urdfs/go1.urdf   -model go1 -x 0 -y 0 -z 0.30 -Y 0.0
[INFO] [1760673163.622594, 0.000000]: Loading model XML from file /root/muse_ws/muse_ws/src/state_estimator/urdfs/go1.urdf
[INFO] [1760673163.639497, 396.228000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1760673163.651219, 396.240000]: Calling service /gazebo/spawn_urdf_model
Service call failed: service [/gazebo/spawn_urdf_model] responded with an error: b''
[ERROR] [1760673163.706577, 396.286000]: Spawn service failed. Exiting.

I test with a minimal spawn a it's seems like there is something is missing in my workspace

root@a41bb57318f9:~/muse_ws/muse_ws# cat > /tmp/minibox.urdf <<'URDF'
> <?xml version="1.0"?>
> <robot name="minibox">
>   <link name="base">
>     <visual><geometry><box size="0.2 0.2 0.2"/></geometry></visual>
>     <collision><geometry><box size="0.2 0.2 0.2"/></geometry></collision>
tial><mass value="1"/><inertia ixx="0.01" iyy="0.0>     <inertial><mass value="1"/><inertia ixx="0.01" iyy="0.01" izz="0.01" ixy="0" ixz="0" iyz="0"/></inertial>
>   </link>
> </robot>
> URDF
root@a41bb57318f9:~/muse_ws/muse_ws# rosrun gazebo_ros spawn_model -urdf -file /tmp/minibox.urdf -model minibox -z 0.3
[INFO] [1760673209.955927, 0.000000]: Loading model XML from file /tmp/minibox.urdf
[INFO] [1760673209.959617, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1760673209.976148, 441.732000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1760673210.246939, 441.909000]: Spawn status: SpawnModel: Successfully spawned entity
root@a41bb57318f9:~/muse_ws/muse_ws# 
Image

If you can help me, I would like to work with you to make a PR for ROS2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions