Skip to content

Commit

Permalink
Changes so that the code can run on the AGX Xavier.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brunno Vanelli committed Jan 15, 2019
1 parent b119759 commit 1dec506
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 9 deletions.
47 changes: 47 additions & 0 deletions launch/ipa_test.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<launch>
<arg name="video" default="$(find tfpose_ros)/etcs/dance.mp4" />
<arg name="video_width" default="1280" />
<arg name="video_height" default="720" />

<arg name="gpuid" default="0" />

<!--
<arg name="model" default="cmu" />
-->
<arg name="model" default="mobilenet_thin" />
<arg name="resolution" default="432x368" />

<node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video0" />
<param name="image_width" value="640" />
<param name="image_height" value="360" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="usb_cam" />
<param name="io_method" value="mmap"/>
</node>

<node name="pose_estimator" pkg="tfpose_ros" type="broadcaster_ros.py" output="screen" required="true">
<env name="CUDA_VISIBLE_DEVICES" value="$(arg gpuid)" />
<param name="camera" value="/usb_cam/image_raw" />
<param name="model" value="$(arg model)" />
<param name="resolution" value="$(arg resolution)" />
</node>

<node name="pose_estimator_vis" pkg="tfpose_ros" type="visualization.py" output="screen" required="true">
<param name="camera" value="/usb_cam/image_raw" />
<param name="pose" value="/pose_estimator/pose" />
</node>

<node name="video_recorder" pkg="video_recorder" type="recorder.py" output="screen" required="true">
<param name="output_width" type="int" value="640" />
<param name="output_height" type="int" value="720" />
<param name="output_format" value="xvid" />
<param name="output_path" value="" />

<param name="output_topic" value="~output" />

<param name="source1" value="/usb_cam/image_raw,0,0,640,360" />
<param name="source2" value="/pose_estimator_vis/output,0,360,640,360" />
</node>
</launch>
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>tfpose_ros</name>
<version>0.1.0</version>
<version>0.1.1</version>
<description>ROS Package for Human Pose Estimation Implemented in Tensorflow</description>

<maintainer email="[email protected]">Curtis Kim</maintainer>
Expand All @@ -20,4 +20,4 @@
<run_depend>std_msgs</run_depend>
<run_depend>rospy</run_depend>

</package>
</package>
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@
author='Ildoo Kim',
author_email='[email protected]',
license='Apache License 2.0',
package_dir={'tf_pose_data': 'models'},
packages=['tf_pose_data'] +
[pkg_name for pkg_name in setuptools.find_packages() # main package
if 'tf_pose' in pkg_name],
packages=setuptools.find_packages(),
ext_modules=[EXT],
package_data={'tf_pose_data': ['graph/cmu/graph_opt.pb',
'graph/mobilenet_thin/graph_opt.pb']},
data_files=[('models/graph/cmu', ['models/graph/cmu/graph_opt.pb']),
('models/graph/mobilenet_thin', ['models/graph/mobilenet_thin/graph_opt.pb']), ],
py_modules=[
"pafprocess"
],
Expand Down
2 changes: 1 addition & 1 deletion tf_pose/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

try:
from tf_pose.pafprocess import pafprocess
except ModuleNotFoundError as e:
except Exception as e:
print(e)
print('you need to build c++ library for pafprocess. See : https://github.com/ildoonet/tf-pose-estimation/tree/master/tf_pose/pafprocess')
exit(-1)
Expand Down

0 comments on commit 1dec506

Please sign in to comment.