You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 14, 2023. It is now read-only.
Message Headers missing dependency information #16
Rosjava is mostly following a scratch that itch development cycle at the moment. Those of us who are scratching itches right now are working at companies and can commit time to fixes where we need it or can justify it. We don't have a need for this one at our company (yet), so it's on the todo...unless someone else gets a terrific urge to scratch this itch ;)
It's probably not too hard to fix - I think you'll need to compare the way gencpp/genpy does things with the code in message_generation.
To summarise the discussion in the issue posted on common_msgs, a likely source is that the message_definition field specified in TCPROS Specification is not providing the dependencies definition as well as the msg definition (should exactly match a rosrun roslib gendeps --cat _msg_file_).
Not a proper fix at all, but at least a work-around: as I had quite some bags that contained messages published by rosjava publishers where I ran into the exception reported in ros/common_msgs#20, I went for the nuclear option and wrote something that replaces the msg defs in connection headers in bag files with completely expanded ones.
The message definitions obviously need to be available (and identical to what was used by the publisher(s)) on the machine running the script, but that is typically the case.
Edit: just solved a pretty serious oversight in rosbag_fixer that caused it to not properly close the bag it writes the "fixed" connection headers to. Smaller bags would suffer data loss which sometimes caused rosbag to not be able to read any messages after running the fixer script. This should now be resolved.
Is there any update on this issue? A permanent fix would be greatly appreciated. Currently, I've been having to use the rosbag_fixer quite often (strangely I do not always have the problem) when recording topics with different types of nodes (rosjava and non-rosjava nodes).
Thanks for the reply. Is there any planned update for rosjava itself? I think the current bug compromises the compatibility with non-rosjava nodes, since recording ros topics into bag files is a very basic ros feature and extensively used for testing purposes.
Rosjava is currently developed mainly by its community; there are no developers working full time or part time on it that I know of. If you need this feature, feel free to submit a PR; I'll review it as soon as I can. If it's something that adds new features and doesn't have too much risk of breaking the existing codebase it will be merged rather fast. I've been pretty packed up lately and I don't have the time to implement this right now.
@gavanderhoorn: thanks for the rosbag_fixer script, it works for me on melodic.
What about adding an option to rosbag record to use local defs? I would like to do it, but not sure if I am capable. Any hints?
I had trouble getting the child headers for dependencies outside of the current package during runtime, so I'm spawning a process for rosrun roslib gendeps --cat while generating the headers. This makes the generation of interfaces and belonging defintions very slow and forces a dependency on gendeps so this is not a proper fix in my opinion, but it does the job.
Activity
valentinp commentedon May 18, 2014
Has there been any progress on this bug? This is particularly annoying for collecting rosbags from Android devices.
stonier commentedon May 19, 2014
Rosjava is mostly following a scratch that itch development cycle at the moment. Those of us who are scratching itches right now are working at companies and can commit time to fixes where we need it or can justify it. We don't have a need for this one at our company (yet), so it's on the todo...unless someone else gets a terrific urge to scratch this itch ;)
It's probably not too hard to fix - I think you'll need to compare the way gencpp/genpy does things with the code in message_generation.
[-]ROS messages are malformed[/-][+]Messages missing dependency information[/+]stonier commentedon Jun 29, 2014
To summarise the discussion in the issue posted on common_msgs, a likely source is that the
message_definitionfield specified in TCPROS Specification is not providing the dependencies definition as well as the msg definition (should exactly match arosrun roslib gendeps --cat _msg_file_).[-]Messages missing dependency information[/-][+]Message Headers missing dependency information[/+]gavanderhoorn commentedon Mar 4, 2018
Not a proper fix at all, but at least a work-around: as I had quite some bags that contained messages published by rosjava publishers where I ran into the exception reported in ros/common_msgs#20, I went for the nuclear option and wrote something that replaces the msg defs in connection headers in bag files with completely expanded ones.
The message definitions obviously need to be available (and identical to what was used by the publisher(s)) on the machine running the script, but that is typically the case.
See gavanderhoorn/rosbag_fixer.
Edit: just solved a pretty serious oversight in
rosbag_fixerthat caused it to not properly close the bag it writes the "fixed" connection headers to. Smaller bags would suffer data loss which sometimes causedrosbagto not be able to read any messages after running the fixer script. This should now be resolved.ramonss commentedon Nov 20, 2018
Is there any update on this issue? A permanent fix would be greatly appreciated. Currently, I've been having to use the rosbag_fixer quite often (strangely I do not always have the problem) when recording topics with different types of nodes (rosjava and non-rosjava nodes).
gavanderhoorn commentedon Nov 20, 2018
I don't believe there has been any development to fix this. As @stonier writes in his comment above,
rosjavaitself must be changed for this.ramonss commentedon Nov 21, 2018
Thanks for the reply. Is there any planned update for rosjava itself? I think the current bug compromises the compatibility with non-rosjava nodes, since recording ros topics into bag files is a very basic ros feature and extensively used for testing purposes.
gavanderhoorn commentedon Nov 21, 2018
I'm just a user, like you :)
Dependent on the rosjava gods.
jubeira commentedon Nov 21, 2018
hi @ramonss,
Rosjava is currently developed mainly by its community; there are no developers working full time or part time on it that I know of. If you need this feature, feel free to submit a PR; I'll review it as soon as I can. If it's something that adds new features and doesn't have too much risk of breaking the existing codebase it will be merged rather fast. I've been pretty packed up lately and I don't have the time to implement this right now.
That certainly made me laugh 😅
krixkrix commentedon Jun 3, 2019
@gavanderhoorn: thanks for the rosbag_fixer script, it works for me on melodic.
What about adding an option to rosbag record to use local defs? I would like to do it, but not sure if I am capable. Any hints?
gavanderhoorn commentedon Jun 3, 2019
Well, that would be adding a work-around for an issue local to
rosjavato a tool that sees most of its usage outside rosjava contexts.Unless there are other use-cases, I doubt the
rosbagmaintainers are going to accept something like that -- and I think I would agree with them.ravesteijnd commentedon Jul 21, 2020
I have created a fix here.
I had trouble getting the child headers for dependencies outside of the current package during runtime, so I'm spawning a process for
rosrun roslib gendeps --catwhile generating the headers. This makes the generation of interfaces and belonging defintions very slow and forces a dependency ongendepsso this is not a proper fix in my opinion, but it does the job.