Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message_conversion: create stand-alone object inst #319

Merged
merged 2 commits into from
Feb 24, 2018

Conversation

onjen
Copy link
Contributor

@onjen onjen commented Jan 19, 2018

Catching the ROSInitException allows to create object
instances without an initialized ROS state

Catching the ROSInitException allows to create object
instances without an initialized ROS state
if rostype in ros_header_types:
inst.stamp = rospy.get_rostime()
except rospy.exceptions.ROSInitException as e:
rospy.logdebug("Not substituting the correct header time: %s" % e)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rospy.logdebug will also fail because ros logger only works after rospy.init_node.

Can you provide me some context why you need this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging functions actually don't raise any exceptions if you call them before init_node, so this should be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be used to create message objects from offline data into a rosbag.

The logging function doesn't raise exceptions, it runs fine like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants