rviz tf movement w.r.t camera
Hi, I have a QR tracker which is using visp_auto_tracker. I want to have the QR position in rviz.
My code:
<!-- -*- xml -*-
This tutorial relies on a live video sequence acquired with an
usb camera in front of a QR code planar target. The model
corresponding to this target is given into the models directory
of this package.
Camera parameters are set as rosparam parameters. They need to be changed
to be the one of your camera.
See http://www.ros.org/wiki/visp_auto_tracker for more information.
-->
<launch>
<!-- camera transforms -->
<node pkg="tf" type="static_transform_publisher"
name="jeroen_cam_tf" args="0 0 1.0 -1.570796 0 -1.570796 /map /jeroen_camera 100"/>
<!-- Launch the tracking node -->
<node pkg="visp_auto_tracker" type="visp_auto_tracker" name="visp_auto_tracker1" output="screen">
<param name="model_path" value="$(find visp_auto_tracker)/models" />
<param name="model_name" value="pattern" />
<param name="debug_display" value="True" />
<remap from="/visp_auto_tracker1/camera_info" to="/usb_cam1/camera_info"/>
<remap from="/visp_auto_tracker1/image_raw" to="/usb_cam1/image_raw"/>
</node>
<!-- Launch the usb camera acquisition node left -->
<node pkg="usb_cam" type="usb_cam_node" name="usb_cam1" output="screen">
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="video_device" value="/dev/video2" />
<param name="pixel_format" value="yuyv" />
<param name="auto_focus" type="bool" value="False" />
<!-- rename the camera name topic into /camera/image_raw to match the one in visp_auto_tracker/models/calibration.ini file -->
<param name="camera_name" value="/camera/image_raw" />
<param name="camera_info_url" value="package://visp_auto_tracker/models/calibration_right.ini" type="string" />
</node>
<node pkg="visp_auto_tracker" type="visp_auto_tracker" name="visp_auto_tracker2" output="screen">
<param name="model_path" value="$(find visp_auto_tracker)/models" />
<param name="model_name" value="pattern" />
<param name="debug_display" value="True" />
<remap from="/visp_auto_tracker2/camera_info" to="/usb_cam2/camera_info"/>
<remap from="/visp_auto_tracker2/image_raw" to="/usb_cam2/image_raw"/>
</node>
<!-- Launch the usb camera acquisition node left -->
<node pkg="usb_cam" type="usb_cam_node" name="usb_cam2" output="screen">
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="video_device" value="/dev/video1" />
<param name="pixel_format" value="yuyv" />
<param name="auto_focus" type="bool" value="False" />
<!-- rename the camera name topic into /camera/image_raw to match the one in visp_auto_tracker/models/calibration.ini file -->
<param name="camera_name" value="/camera/image_raw" />
<param name="camera_info_url" value="package://visp_auto_tracker/models/calibration_left.ini" type="string" />
</node>
</launch>
I'm using this line to have the position of the camera in rviz:
<!-- camera transforms -->
<node pkg="tf" type="static_transform_publisher"
name="jeroen_cam_tf" args="0 0 1.0 -1.570796 0 -1.570796 /map /jeroen_camera 100"/>
But my object is moving with respect to the map, i want to let it move with respect to the camera. Who can help me?