ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi, I have managed to solve it like this, hope it will help to some one :), this just the piece of code that called the slot.
self._widget.autonomous.pressed.connect(self._load_launchfile_slot)
@Slot(str) def _load_launchfile_slot(self): launchfile_name = 'patrolbot_navigation.launch' folder_name_launchfile = 'launch' pkg_name = 'patrol_navigation'
try:
#launchfile = os.path.join(rospkg.RosPack().get_path(pkg_name), folder_name_launchfile, launchfile_name)
#print( launchfile)
args = roslaunch.rlutil.resolve_launch_arguments([pkg_name, launchfile_name])
rospy.loginfo("Starting task: %s"%args)
runner = roslaunch.parent.ROSLaunchParent( rospy.get_param("/run_id"), args)
runner.start()
except IndexError as e:
raise RLException('IndexError: {}'.format(e.message))
2 | No.2 Revision |
Hi, I have managed to solve it like this, hope it will help to some one :), this just the piece of code that called the slot.
self._widget.autonomous.pressed.connect(self._load_launchfile_slot)
self._widget.autonomous.pressed.connect(self._load_launchfile_slot)
@Slot(str) def _load_launchfile_slot(self):