Hello,
I want to extract with a python script the position of a robot (that I know the model name of) from gazebo.
In many forum posts and tutorials for ROS1, the /gazebo/get_model_state
service (API docu) is used for that, but I can not see it with ros2 service list
When I create it myself, the client raises an error, that the GetModelState.Request is not a SrvTypeRequest. I have not found any other ways to make this work so far.
My services are:
/apply_joint_effort [gazebo_msgs/srv/ApplyJointEffort]
/apply_link_wrench [gazebo_msgs/srv/ApplyLinkWrench]
/clear_joint_efforts [gazebo_msgs/srv/JointRequest]
/clear_link_wrenches [gazebo_msgs/srv/LinkRequest]
/delete_entity [gazebo_msgs/srv/DeleteEntity]
/gazebo/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/gazebo/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/gazebo/get_parameters [rcl_interfaces/srv/GetParameters]
/gazebo/list_parameters [rcl_interfaces/srv/ListParameters]
/gazebo/set_parameters [rcl_interfaces/srv/SetParameters]
/gazebo/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically]
/get_model_list [gazebo_msgs/srv/GetModelList]
/pause_physics [std_srvs/srv/Empty]
/position_handler/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/position_handler/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/position_handler/get_parameters [rcl_interfaces/srv/GetParameters]
/position_handler/list_parameters [rcl_interfaces/srv/ListParameters]
/position_handler/set_parameters [rcl_interfaces/srv/SetParameters]
/position_handler/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically]
/reset_simulation [std_srvs/srv/Empty]
/reset_world [std_srvs/srv/Empty]
/spawn_entity [gazebo_msgs/srv/SpawnEntity]
/turtlebot3_imu/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/turtlebot3_imu/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/turtlebot3_imu/get_parameters [rcl_interfaces/srv/GetParameters]
/turtlebot3_imu/list_parameters [rcl_interfaces/srv/ListParameters]
/turtlebot3_imu/set_parameters [rcl_interfaces/srv/SetParameters]
/turtlebot3_imu/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically]
/turtlebot3_joint_state/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/turtlebot3_joint_state/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/turtlebot3_joint_state/get_parameters [rcl_interfaces/srv/GetParameters]
/turtlebot3_joint_state/list_parameters [rcl_interfaces/srv/ListParameters]
/turtlebot3_joint_state/set_parameters [rcl_interfaces/srv/SetParameters]
/turtlebot3_joint_state/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically]
/turtlebot3_laserscan/describe_parameters [rcl_interfaces/srv/DescribeParameters]
/turtlebot3_laserscan/get_parameter_types [rcl_interfaces/srv/GetParameterTypes]
/turtlebot3_laserscan/get_parameters [rcl_interfaces/srv/GetParameters]
/turtlebot3_laserscan/list_parameters [rcl_interfaces/srv/ListParameters]
/turtlebot3_laserscan/set_parameters [rcl_interfaces/srv/SetParameters]
/turtlebot3_laserscan/set_parameters_atomically [rcl_interfaces/srv/SetParametersAtomically]
/unpause_physics [std_srvs/srv/Empty]
with my own started service as /gazebo/get_model_state [gazebo_msgs/srv/GetModelState]
.
If you have any ideas or helpful tutorials, please let me know. Thank you for your time!