Camera model position rviz
I want to put a realsense camera into my rviz environment. I already have a camera_color_frame so I want to spawn camera description in reference to camera_color_frame:
<?xml version="1.0"?>
<robot name="realsense2_camera" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:arg name="use_nominal_extrinsics" default="false"/>
<xacro:arg name="add_plug" default="false" />
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" />
<link name="camera_color_frame" />
<xacro:sensor_d435 parent="camera_color_frame" use_nominal_extrinsics="$(arg use_nominal_extrinsics)" add_plug="$(arg add_plug)">
<origin xyz="0 0 0" rpy="0 0 0"/>
</xacro:sensor_d435>
</robot>
It doesn't work because camera_color_frame is not on the top of tf tree, most of connections doesn't work, only camera_color_optical_frame works - it is bottom part of tf tree, under camera_color_frame. How to refactor urdf of realsense camera to make camera_color_frame on the top of tree? I don't want to create a new urdf manually.