This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
31 lines (26 sloc)
898 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''This runs the PbD system (i.e. the backend).''' | |
# Core ROS imports come first. | |
import roslib | |
roslib.load_manifest('pr2_pbd_interaction') | |
import rospy | |
if __name__ == '__main__': | |
# Check whether we want code coverage, and start if so. | |
use_coverage = rospy.get_param( | |
'/pr2_pbd_interaction/coverage', default=False) | |
if use_coverage: | |
from coverage import coverage | |
cov = coverage( | |
include="*/pr2_pbd_interaction/src/*.py", # source files | |
omit="*/src/pr2_pbd_interaction/*" # generated files | |
) | |
cov.start() | |
# Run the system | |
import interaction | |
interaction_ = interaction.Interaction() | |
rospy.spin() | |
# System execution finished; generate coverage report if enabled. | |
if use_coverage: | |
cov.stop() | |
cov.save() | |
cov.html_report(title='PR2 PbD code coverage') |