Error using Python GetModelResponse
This code works in cpp.
ros::ServiceClient client = n.serviceClient<gazebo_msgs::GetModelState>("/gazebo/get_model_state");
gazebo_msgs::GetModelState getmodelstate;
getmodelstate.request.model_name ="rrbot";
client.call(getmodelstate);
But in python ...
# Take pose from gazebo: ignore rviz pose:
rospy.wait_for_service("/gazebo/get_model_state")
client = rospy.ServiceProxy("/gazebo/get_model_state", GetModelState)
getmodelstate = client(model_name="rrbot")
# Set starting data x,y and theta for odometry used in handelerJointControllerState
self.theta = getmodelstate.response.pose.orientation.z
I get the following error:
self.theta = getmodelstate.response.pose.orientation.z
AttributeError: 'GetModelStateResponse' object has no attribute 'response'
Any thoughts on the nature of this error.