Skip to content

change gravity at runtime #766

@muttistefano

Description

@muttistefano

Hello All,
I am trying to change gravity in runtime by using :

gz service -s /world/world_demo/set_physics --reqtype gz.msgs.Physics --reptype gz.msgs.Boolean --timeout 2000 --req 'gravity { x: 0 y: 0 z: -2.8 }'

which returns :
data: true

The problem is that in the simulation, the gravity does not change.
I tried multiple physics plugins, and none of them allow this change.

I don't know if it's related, but I get this output on the gz terminal when I make the first call to the gz service to change gravity :

[gazebo-2] [Wrn] [Component.hh:144] Trying to serialize component with data type [N2gz4msgs7PhysicsE], which doesn't have operator<<. Component will not be serialized.
[gazebo-2] [GUI] [Wrn] [Component.hh:189] Trying to deserialize component with data type [N2gz4msgs7PhysicsE], which doesn't have operator>>. Component will not be deserialized.

Am I doing something wrong, or is this simply not implemented?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions