ros-drivers/nmea_navsat_driver

how to remove leading / from frame_id

elgarbe opened this issue · 1 comments

I'm using robot localization package and it doesn't like the "/" on the frame id. I've read some stuff on the closed issues, but I'm not sure how to correct this. I've installed from binaries on kinetic and it uses the "/"
Do I need to install from source? which branch is used for kinetic and have this issue solved?

Thank

There is no way to configure the driver to not use the leading / prefix. If you wish to install from source, ROS kinetic uses the kinet-devel branch, and you can edit the static method get_frame_id() to remove the prefix

def get_frame_id():
frame_id = rospy.get_param('~frame_id', 'gps')
if frame_id[0] != "/":
"""Add the TF prefix"""
prefix = ""
prefix_param = rospy.search_param('tf_prefix')
if prefix_param:
prefix = rospy.get_param(prefix_param)
if prefix[0] != "/":
prefix = "/%s" % prefix
return "%s/%s" % (prefix, frame_id)
else:
return frame_id