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

Revision history [back]

click to hide/show revision 1
initial version

Is there a way to define a ROS message or service with arbitrary python objects?

No.

Is the only option to use a string and use json.dumps / json.loads?

Don't know whether it's the only way, but it is a way.

Can you clarify why you'd want to do this?

It's a really heavy and invasive form of coupling, which limits reusability of your components.

Is there a way to define a ROS message or service with arbitrary python objects?

No.Assuming you mean: can I have fields with types of 'arbitrary Python types', then: no.

Is the only option to use a string and use json.dumps / json.loads?

Don't know whether it's the only way, but it is a way.

Can you clarify why you'd want to do this?

It's a really heavy and invasive form of coupling, which limits reusability of your components.