mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
first push on supporting ROS2 Dashing and IDL 4.2
This commit is contained in:
@@ -117,6 +117,13 @@ void @(topic)_Subscriber::SubListener::onNewDataMessage(Subscriber* sub)
|
||||
{
|
||||
// Take data
|
||||
if(sub->takeNextData(&msg, &m_info))
|
||||
@[if (ros2_distro == "ardent" or ros2_distro == "bouncy" or ros2_distro == "crystal") and float(fastrtps_version) < 1.9]@
|
||||
@(topic)_ st;
|
||||
@[else]@
|
||||
@(topic) st;
|
||||
@[end if]@
|
||||
|
||||
if(sub->takeNextData(&st, &m_info))
|
||||
{
|
||||
if(m_info.sampleKind == ALIVE)
|
||||
{
|
||||
@@ -141,7 +148,11 @@ bool @(topic)_Subscriber::hasMsg()
|
||||
return m_listener.has_msg;
|
||||
}
|
||||
|
||||
@[if (ros2_distro == "ardent" or ros2_distro == "bouncy" or ros2_distro == "crystal") and float(fastrtps_version) < 1.9]@
|
||||
@(topic)_ @(topic)_Subscriber::getMsg()
|
||||
@[else]@
|
||||
@(topic) @(topic)_Subscriber::getMsg()
|
||||
@[end if]@
|
||||
{
|
||||
m_listener.has_msg = false;
|
||||
return m_listener.msg;
|
||||
|
||||
Reference in New Issue
Block a user