Commit 9f1b5722 authored by Larkin Heintzman's avatar Larkin Heintzman

image tweaks and clean up

parent 7a6c749e
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<include file="$(find base_station)/launch/remote_image_test.launch"> <include file="$(find base_station)/launch/remote_image_test.launch">
<arg name="machine_name" value="nerudaKube"/> <arg name="machine_name" value="nerudaKube"/>
<arg name="machine_id" value="0"/> <arg name="machine_id" value="0"/>
<arg name="video_stream_provider" value="99"/>
</include> </include>
</launch> </launch>
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
<group ns="$(arg machine_name)"> <group ns="$(arg machine_name)">
<!-- run viewer on base station laptop --> <!-- run viewer on base station laptop -->
<node name="imageNode" pkg="base_station" type="imageNode.py"> <node name="imageNode" pkg="base_station" type="imageNode.py" machine="$(arg machine_name)">
<param name="visualize" type="bool" value="false"/> <param name="visualize" type="bool" value="false"/>
<param name="save" type="bool" value="true"/> <param name="save" type="bool" value="true"/>
<param name="folderName" type="string" value="/home/ssher/imageDump"/> <!-- from home dir -->
<param name="folderName" type="string" value="imageNFS"/>
</node> </node>
<!-- run webcam stream on remote node --> <!-- run webcam stream on remote node -->
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
<arg name="camera_name" default="usb_camera" /> <arg name="camera_name" default="usb_camera" />
<!-- video_stream_provider can be a number as a video device or a url of a video stream --> <!-- video_stream_provider can be a number as a video device or a url of a video stream -->
<arg name="video_stream_provider" default="0" /> <arg name="video_stream_provider" default="99" />
<!-- set camera fps to --> <!-- set camera fps to -->
<arg name="set_camera_fps" default="30" /> <arg name="set_camera_fps" default="30" />
<!-- set buffer queue size of frame capturing to --> <!-- set buffer queue size of frame capturing to -->
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<!-- </group> --> <!-- </group> -->
<!-- gui interface and imaging nodes --> <!-- gui interface and imaging nodes -->
<node pkg="dji_osdk_ros" type="image_activation.py" name="image_activation" output="screen" machine="$(arg machine_name)"/> <node pkg="dji_osdk_ros" type="imageActivation.py" name="imageActivation" output="screen" machine="$(arg machine_name)"/>
<node pkg="database_tools" type="sqlite_upload.py" name="sql_uploader"/> <node pkg="database_tools" type="sqlite_upload.py" name="sql_uploader"/>
<node name="image_handler" pkg="database_tools" type="image_handler.py"/> <node name="image_handler" pkg="database_tools" type="image_handler.py"/>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<!-- </group> --> <!-- </group> -->
<!-- gui interface and imaging nodes --> <!-- gui interface and imaging nodes -->
<node pkg="bus_driver" type="image_activation.py" name="image_activation" output="screen" machine="$(arg machine_name)"/> <node pkg="bus_driver" type="imageActivation.py" name="imageActivation" output="screen" machine="$(arg machine_name)"/>
<node pkg="database_tools" type="sqlite_upload_yeats.py" name="sql_uploader"/> <node pkg="database_tools" type="sqlite_upload_yeats.py" name="sql_uploader"/>
<node name="image_handler" pkg="database_tools" type="image_handler.py"/> <node name="image_handler" pkg="database_tools" type="image_handler.py"/>
<!-- <node pkg="bus_driver" type="poseFeedbackConversion.py" name="poseFeedbackConversion" output="screen" machine="$(arg machine_name)"> <!-- <node pkg="bus_driver" type="poseFeedbackConversion.py" name="poseFeedbackConversion" output="screen" machine="$(arg machine_name)">
......
...@@ -42,11 +42,13 @@ def main(): ...@@ -42,11 +42,13 @@ def main():
# print ("File exist") # print ("File exist")
if windowFlag: if windowFlag:
cv2.imshow("image window", iv.image) cv2.imshow("image window", iv.image)
rospy.loginfo("publishing image to window seq: " + iv.seq)
if saveFlag: if saveFlag:
cv2.imwrite(folderName + "/camera_image_{seq}.jpeg".format(seq = iv.seq), iv.image) cv2.imwrite("/home/" + getpass.getuser() + "/" folderName + "/camera_image_{seq}.jpeg".format(seq = iv.seq), iv.image)
rospy.loginfo("saving image to folder: home-> " + folderName + "-> camera_image_{seq}.jpeg".format(seq = iv.seq) + " seq: " + str(iv.seq))
cv2.waitKey(10) cv2.waitKey(10)
else: else:
print ("File not exist") rospy.loginfo("camera dir missing!")
# cv2.destroyAllWindows() # cv2.destroyAllWindows()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment