1. Questions
In the run Ros by Example 2--indigo version, run the Smach_viewer, and then run the patrol with the following command:
$ rosrun smach_viewer smach_viewer.py$ rosrun rbx2_tasks patrol_smach.py
The following error occurred:
XceptioninchThread thread-5: Traceback (most recent call Last): File"/usr/lib/python2.7/threading.py", line810,inch__bootstrap_inner self.run () File"/usr/lib/python2.7/threading.py", line763,inchRun Self.__target (*self.__args, * *Self.__kwargs) File"/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line848,inch_update_graph Self.set_dotcode (dotstr,zoom=False) File"/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line866,inchSet_dotcodeifSelf.widget.set_dotcode (Dotcode, None): File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line455,inchset_dotcode Self.set_xdotcode (xdotcode) File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line483,inchSet_xdotcode self.graph=parser.parse () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line1146,inchparse Dotparser.parse (self) File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line951,inchParse Self.parse_graph () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line960,inchparse_graph self.parse_stmt () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line993,inchparse_stmt self.parse_subgraph () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line974,inchparse_subgraph self.parse_stmt () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line993,inchparse_stmt self.parse_subgraph () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line974,inchparse_subgraph self.parse_stmt () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line1009,inchparse_stmt Self.handle_node (ID, Attrs) File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line1120,inchHandle_node Shapes.extend (Parser.parse ()) File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line608,inchParse points=Self.read_polygon () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line503,inchRead_polygon x, y=self.read_point () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line486,inchRead_point x=self.read_number () File"/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line480,inchRead_number returnint(Self.read_code ()) valueerror:invalid literal for int() with baseTen:'402.67'
2. Solutions
The code for the 480 lines of the file:
Int
Change to:
int (float(Self.read_code ()))
To the source of the solution:
1. ROS indigo:cannot show Graph View on Smach_viewer
Out of:
Smach in the robot control is too important, PR2 development, found that without a complete set of framework to perform tasks, will lead to code maintenance is particularly complicated, so the big boys to develop this set of Smach state machine function package, since to use, do not detours, recently tried several tasks of the implementation, deep experience, It's better to use it sooner than you know it.
Ros Knowledge (--smach_viewer) Graph view cannot display a status graph