I stuck with it for few 10 minutes. I thought I should keep this information here if it helps.
It may seem very natural not to use the python keyword as any variable name in python or msg.
However, unknowingly, I tried making a custom msg and used it inside another custom msg. (Not relevant)
As I have given the name as 'in' (as I am mostly coding in c/cpp) the msg was not being created.
However, this issue could be with any variable in msg, given reserved python keyword.
It will not be able to make a msg for Arduino or so.
msg example
int32 in
int32 out
The error msg will look like this:
$ rosrun rosserial_stm32f1 make_libraries.py (.... rest of the args)
Traceback (most recent call last):
File "make_libraries.py", line 101, in <module>
rosserial_generate(rospack, path+"/Inc/", ROS_TO_EMBEDDED_TYPES)
File "rosserial_client/make_library.py", line 571, in rosserial_generate
raise Exception("Failed to generate libraries for: " + str(failed))
Exception: Failed to generate libraries for: ['crazy_msgs (invalid syntax (_crazy_msg.py, line 112))']
I stuck with it for few 10 minutes. I thought I should keep this information here if it helps. It may seem very natural not to use the python keyword as any variable name in python or msg.
However, unknowingly, I tried making a custom msg and used it inside another custom msg. (Not relevant) As I have given the name as 'in' (as I am mostly coding in c/cpp) the msg was not being created.
However, this issue could be with any variable in msg, given reserved python keyword. It will not be able to make a msg for Arduino or so.
msg example
The error msg will look like this:
Hope it helps someone.