forked from Archive/PX4-Autopilot
microRTPS: templates: only decode ros2_distro when possible and nedeed
This commit is contained in:
parent
981f8d5d90
commit
2930b55732
|
@ -16,7 +16,10 @@ import gencpp
|
|||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||
|
||||
topic = alias if alias else spec.short_name
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
try:
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
except AttributeError:
|
||||
pass
|
||||
}@
|
||||
/****************************************************************************
|
||||
*
|
||||
|
@ -58,6 +61,7 @@ ros2_distro = ros2_distro.decode("utf-8")
|
|||
* This file was adapted from the fastcdrgen tool.
|
||||
*/
|
||||
|
||||
|
||||
#include <fastrtps/participant/Participant.h>
|
||||
#include <fastrtps/attributes/ParticipantAttributes.h>
|
||||
#include <fastrtps/publisher/Publisher.h>
|
||||
|
|
|
@ -16,7 +16,10 @@ import gencpp
|
|||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||
|
||||
topic = alias if alias else spec.short_name
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
try:
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
except AttributeError:
|
||||
pass
|
||||
}@
|
||||
/****************************************************************************
|
||||
*
|
||||
|
|
|
@ -21,7 +21,10 @@ send_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumer
|
|||
recv_topics = [(alias[idx] if alias[idx] else s.short_name) for idx, s in enumerate(spec) if scope[idx] == MsgScope.RECEIVE]
|
||||
package = package[0]
|
||||
fastrtpsgen_version = fastrtpsgen_version[0]
|
||||
ros2_distro = ros2_distro[0].decode("utf-8")
|
||||
try:
|
||||
ros2_distro = ros2_distro[0].decode("utf-8")
|
||||
except AttributeError:
|
||||
ros2_distro = ros2_distro[0]
|
||||
}@
|
||||
/****************************************************************************
|
||||
*
|
||||
|
|
|
@ -16,7 +16,10 @@ import gencpp
|
|||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||
|
||||
topic = alias if alias else spec.short_name
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
try:
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
except AttributeError:
|
||||
pass
|
||||
}@
|
||||
/****************************************************************************
|
||||
*
|
||||
|
|
|
@ -16,7 +16,10 @@ import gencpp
|
|||
from px_generate_uorb_topic_helper import * # this is in Tools/
|
||||
|
||||
topic = alias if alias else spec.short_name
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
try:
|
||||
ros2_distro = ros2_distro.decode("utf-8")
|
||||
except AttributeError:
|
||||
pass
|
||||
}@
|
||||
/****************************************************************************
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue