Skip to content

Commit f55e23c

Browse files
committed
[hrpsys_ros_bridge] RangeROSBridge and PointCloudROSBridge use ROS nodename as RTC component's name
1 parent 90a24fe commit f55e23c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

hrpsys_ros_bridge/src/PointCloudROSBridgeComp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ void MyModuleInit(RTC::Manager* manager)
1717
RTC::RtcBase* comp;
1818

1919
// Create a component
20-
comp = manager->createComponent("PointCloudROSBridge");
21-
20+
comp = manager->createComponent(std::string("PointCloudROSBridge?instance_name="+ros::this_node::getName().substr(ros::this_node::getNamespace().length())).c_str());
2221

2322
// Example
2423
// The following procedure is examples how handle RT-Components.

hrpsys_ros_bridge/src/RangeSensorROSBridgeComp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ void MyModuleInit(RTC::Manager* manager)
1717
RTC::RtcBase* comp;
1818

1919
// Create a component
20-
comp = manager->createComponent("RangeSensorROSBridge");
21-
20+
comp = manager->createComponent(std::string("RangeSensorROSBridge?instance_name="+ros::this_node::getName().substr(ros::this_node::getNamespace().length())).c_str());
2221

2322
// Example
2423
// The following procedure is examples how handle RT-Components.

0 commit comments

Comments
 (0)