ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
When you create your gazebo_msgs::GetPhysicsProperties getphysicsproperties object with the default constructor, all values will be initialized to zero (including time_step). In order to get the current properties from Gazebo you have to call the /gazebo/get_physics_properties first with getphysicsproperties as argument.
2 | No.2 Revision |
Hi,
When you create your gazebo_msgs::GetPhysicsProperties getphysicsproperties object with the default constructor, all values will be initialized to zero (including time_step). In order to get the current properties from Gazebo you first have to call the /gazebo/get_physics_properties first service with getphysicsproperties as argument.
3 | No.3 Revision |
Hi,
When you create your gazebo_msgs::GetPhysicsProperties getphysicsproperties object with the default constructor, all values will be initialized to zero (including time_step). In order to get the current properties from Gazebo you first have to call the /gazebo/get_physics_properties service with getphysicsproperties as argument.
Also, in order to get the current model state from Gazebo you have to call the /gazebo/get_model_state service with a gazebo_msgs/GetModelState object as argument.
4 | No.4 Revision |
Hi,
When you create your gazebo_msgs::GetPhysicsProperties getphysicsproperties object with the default constructor, all values will be initialized to zero (including time_step). In order to get the current properties from Gazebo you first have to call the /gazebo/get_physics_properties service with getphysicsproperties as argument.
Also, in order to get the current model state from Gazebo you have to call the /gazebo/get_model_state service with a gazebo_msgs/GetModelState object as argument.
ros::ServiceClient pp_c = n.serviceClient<gazebo_msgs::GetPhysicsProperties>("/gazebo/get_physics_properties");
pp_c.call(getphysicsproperties);//getphysicsproperties now holds the current properties
//create your desired model state and call the /gazebo/set_model_state service here
gazebo_msgs::GetModelState ms;
ms.request.model_name="my_robot";
ros::ServiceClient gms_c = n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
gms_c.call(ms);//ms now holds the current state
5 | No.5 Revision |
Hi,
When you create your gazebo_msgs::GetPhysicsProperties getphysicsproperties object with the default constructor, all values will be initialized to zero (including time_step). In order to get the current properties from Gazebo you first have to call the /gazebo/get_physics_properties service with getphysicsproperties as argument.
Also, in order to get the current model state from Gazebo you have to call the /gazebo/get_model_state service with a gazebo_msgs/GetModelState object as argument.argument:
ros::ServiceClient pp_c = n.serviceClient<gazebo_msgs::GetPhysicsProperties>("/gazebo/get_physics_properties");
pp_c.call(getphysicsproperties);//getphysicsproperties now holds the current properties
//create your desired model state and call the /gazebo/set_model_state service here
gazebo_msgs::GetModelState ms;
ms.request.model_name="my_robot";
gms;
gms.request.model_name="my_robot";
ros::ServiceClient gms_c = n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
gms_c.call(ms);//ms gms_c.call(gms);//gms now holds the current state