siemens / ros-sharp

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particular Unity3D
Apache License 2.0
987 stars 373 forks source link

GetParamRequest error ROS1 #461

Closed Cryoscopic-E closed 3 weeks ago

Cryoscopic-E commented 1 month ago

Hi,

When getting the param name from the rosapi service (in particular when importing urdf from ros) I get the following exception from the rosbridge.

Ros bridge exception: call_service FieldTypeMismatchException: rosapi/GetParamRequest message requires a string for field default, but got a <class 'NoneType'>

I'm working with ubuntu 20 and ros noetic, and you can reproduce it by trying to get a parameter from rosapi service (I was trying to get tthe turtlebot3 name and urdf)

I tracked it down do be a problem in the GetParamRequest: https://github.com/siemens/ros-sharp/blob/fa4003b0293418cfeb530e818dcd365e3833ed65/Libraries/RosBridgeClient/MessageTypes/ROS1/Rosapi/srv/GetParamRequest.cs#L30

It is working as intended when this line is modified tothis.@default = @default

memrecakal commented 1 month ago

Hi @Cryoscopic-E, thanks for the feedback. GetParamRequest is an auto-generated class and the MessageGeneration project needs to be fixed for that.