ros-visualization / executive_smach_visualization

A ROS-based introspection tool for visualizing the structure and state of SMACH plans.
18 stars 68 forks source link

Allow launching from a launch file, use rospy.myargv() to remove ROS remapping arguments #16

Closed kartikmohta closed 7 years ago

kartikmohta commented 7 years ago

Required to allow launching from a launch file, otherwise get errors of the type:

usage: smach_viewer.py [-h] [-f]
smach_viewer.py: error: unrecognized arguments: __name:=smach_viewer
furushchev commented 7 years ago

+1 for the bugfix, though there are also lots of unrelated changes included...

furushchev commented 7 years ago

Just to clarify, without this PR, launching smach_viewer from launch file fails:

<launch>
  <node name="smach_viewer" pkg="smach_viewer" type="smach_viewer.py" />
</launch>
SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.21

NODES
  /
    smach_viewer (smach_viewer/smach_viewer.py)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[smach_viewer-1]: started with pid [15151]
usage: smach_viewer.py [-h] [-f]
smach_viewer.py: error: unrecognized arguments: __name:=smach_viewer __log:=/home/furushchev/.ros/log/30411004-78dc-11e7-8090-a434d9dcb7b6/smach_viewer-1.log
[smach_viewer-1] process has died [pid 15151, exit code 2, cmd /opt/ros/indigo/lib/smach_viewer/smach_viewer.py __name:=smach_viewer __log:=/home/furushchev/.ros/log/30411004-78dc-11e7-8090-a434d9dcb7b6/smach_viewer-1.log].
log file: /home/furushchev/.ros/log/30411004-78dc-11e7-8090-a434d9dcb7b6/smach_viewer-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
kartikmohta commented 7 years ago

@furushchev Just add ?w=1 to the end of the URL to ignore the whitespace changes when looking at the commit changes.

furushchev commented 7 years ago

@kartikmohta I think the change rather should be in another pull request.

snozawa commented 7 years ago

+1 for the bugfix in this PR!

+1 for handling of the whitespace : https://github.com/ros-visualization/executive_smach_visualization/pull/16#issuecomment-320172263

furushchev commented 7 years ago

@kartikmohta Thanks! Now It's much clear and +1 more to be merged!

snozawa commented 7 years ago

@kartikmohta Thanks a lot!

StephanHasler commented 7 years ago

+1 The proposed solution works for me. It solves issue: #17

mk-nk commented 7 years ago

+1 for the bugfix #17

k-okada commented 7 years ago

merged and released https://github.com/ros/rosdistro/pull/16169