ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Perhaps spaces are not allowed between the constant name and the constant value. Try the following and it may work.

int32 CODE_DELETE=-1
int32 CODE_DELETE_ALL=0
int32 CODE_ADD=1
bool ADD_MODE_RANDOM=False
bool ADD_MODE_SPECIFIED=True
int32 update_code
bool add_mode
float64 half_range
float64[] position_2d
---
uint8 SUCCESS=1
uint8 ADD_FAIL_NO_RESPONSE=2
uint8 ADD_FAIL_TOO_CROWDED=3
uint8 ADD_FAIL_OCCUPIED=4
uint8 DELETE_FAIL_NO_RESPONSE=5
uint8 DELETE_FAIL_EXCEED_QUANTITY=6
uint8 FAIL_OTHER_REASONS=7
uint8 response_code

ref: http://wiki.ros.org/srv#Service_Description_Specification

Perhaps spaces are not allowed between the constant name and the constant value. Try the following and it may work.

int32 CODE_DELETE=-1
int32 CODE_DELETE_ALL=0
int32 CODE_ADD=1
bool ADD_MODE_RANDOM=False
bool ADD_MODE_SPECIFIED=True
int32 update_code
bool add_mode
float64 half_range
float64[] position_2d
---
uint8 SUCCESS=1
uint8 ADD_FAIL_NO_RESPONSE=2
uint8 ADD_FAIL_TOO_CROWDED=3
uint8 ADD_FAIL_OCCUPIED=4
uint8 DELETE_FAIL_NO_RESPONSE=5
uint8 DELETE_FAIL_EXCEED_QUANTITY=6
uint8 FAIL_OTHER_REASONS=7
uint8 response_code

ref: http://wiki.ros.org/srv#Service_Description_Specification

Update

Two_wheel_robot_service = rospy.Service("/morph_sim/two_wheel_robot_update", two_wheel_robot_update, twoWheelRobotUpdateCallback, (add_ model_client, delete_model_client, two_wheel_robot_urdf))

The last argument is the buffer size, which seems to take an integer type instead of a list. If it is not specified, the default value is 65536. Thus

Two_wheel_robot_service = rospy.Service("/morph_sim/two_wheel_robot_update", two_wheel_robot_update, twoWheelRobotUpdateCallback)

If you haven't tried it, could you please try

ref: http://wiki.ros.org/rospy/Overview/Services#Providing_services