Skip to content

Commit

Permalink
Provide launch file for rosbag replay
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer committed Nov 15, 2019
1 parent 9fbbd39 commit 9b9678d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
5 changes: 2 additions & 3 deletions rt_gene/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ More information can be found on the Personal Robotic Lab's website: <https://ww

### Estimate gaze from ROSBag
1) `roscore`
1) `rosbag play --clock /path/to/rosbag.bag`
1) `rosrun image_transport republish compressed in:=/kinect2/hd/image_color_rect raw out:=/kinect2/hd/image_color_rect`
1) `roslaunch rt_gene estimate_gaze.launch`
1) `roslaunch rt_gene start_rosbag.launch rosbag_file:=/path/to/rosbag.bag` (this assumes a recording with the Kinect v2 and might need adjustments)
1) `roslaunch rt_gene estimate_gaze.launch ros_frame:=kinect2_nonrotated_link`

## List of libraries
- ROS; [BSD 3-clause](https://opensource.org/licenses/BSD-3-Clause), [Link to website](http://ros.org/)
Expand Down
7 changes: 7 additions & 0 deletions rt_gene/launch/start_rosbag.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<launch>
<arg name="rosbag_file" />
<node name="republish_rgb" type="republish" pkg="image_transport" args="compressed in:=/kinect2/hd/image_color_rect raw out:=/kinect2/hd/image_color" />

<node pkg="rosbag" type="play" name="player" args="--clock $(arg rosbag_file)" output="screen" />
</launch>

12 changes: 6 additions & 6 deletions rt_gene/launch/start_video.launch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<launch>
<arg name="video_namespace" default="/kinect2/hd"/>
<arg name="video_image_topic" default="image_color"/>
<arg name="video_info_topic" default="camera_info"/>
<arg name="camera_name" default="kinect2"/>
<arg name="video_file" default="/home/tobias/video.mov"/>
<arg name="camera_info_url" default="file:///home/tobias/kinect2.yaml"/>
<arg name="video_namespace" default="/kinect2/hd" />
<arg name="video_image_topic" default="image_color" />
<arg name="video_info_topic" default="camera_info" />
<arg name="camera_name" default="kinect2" />
<arg name="video_file" default="/home/tobias/video.mov" />
<arg name="camera_info_url" default="file:///home/tobias/kinect2.yaml" />

<node pkg="video_stream_opencv" type="video_stream" name="$(arg camera_name)_stream" output="screen">
<remap from="camera" to="$(arg video_namespace)/$(arg video_image_topic)" />
Expand Down
12 changes: 6 additions & 6 deletions rt_gene/launch/start_webcam.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<arg name="camera_port" default="/dev/video0" />
<arg name="camera_info_name" default="webcam_blue_26010230.yaml" />

<arg name="video_namespace" default="/kinect2/hd"/>
<arg name="video_image_topic" default="image_color"/>
<arg name="video_info_topic" default="camera_info"/>
<arg name="video_namespace" default="/kinect2/hd" />
<arg name="video_image_topic" default="image_color" />
<arg name="video_info_topic" default="camera_info" />

<arg name="rgb_frame_id" default="/kinect2_link"/>
<arg name="rgb_frame_id_ros" default="/kinect2_ros_frame"/>
<arg name="publish_ros_static_frame" default="True"/>
<arg name="rgb_frame_id" default="/kinect2_link" />
<arg name="rgb_frame_id_ros" default="/kinect2_ros_frame" />
<arg name="publish_ros_static_frame" default="True" />

<node pkg="tf2_ros" type="static_transform_publisher" name="ros_static_transform_publisher"
args="0.0 0.0 0.0 -0.5 0.5 -0.5 0.5 $(arg rgb_frame_id_ros) $(arg rgb_frame_id)" if="$(arg publish_ros_static_frame)" />
Expand Down

0 comments on commit 9b9678d

Please sign in to comment.