Camera sensor not correctly attached to the robot joint. How to fix it?
Hi
Im using ZED camera and darkner_ros package to detect objects. As a robot, I have build Tower Crane model, but when attaching the ZED camera to the robot the objects are not placed correctly. In the Moveit Scene, the origin of the ZED Camera is in the crane base but it should be in the hook block just above the load (that is the crane_block). The TF tree shows correctly but still, the RVIZ simulation is not correct.
Here the RVIZ and the TF
Here the ZED launch file
<?xml version="1.0"?>
<launch>
<!-- Camera Model -->
<arg name="node_name" default="zed_node" />
<!-- Camera Model -->
<arg name="camera_model" default="zed" /> <!-- 'zed' or 'zedm' -->
<!-- Load SVO file -->
<arg name="svo_file" default="" /><!-- <arg name="svo_file" default="path/to/svo/file.svo"> -->
<!-- Remote stream -->
<arg name="stream" default="" /> <!-- <arg name="stream" default="<ip_address>:<port>"> -->
<!-- Publish ZED urdf -->
<arg name="publish_urdf" default="true" />
<arg name="camera_id" default="-1" />
<arg name="gpu_id" default="-1" />
<group ns="zed">
<!-- ROS URDF description of the ZED -->
<group if="$(arg publish_urdf)">
<param name="zed_description" textfile="$(find zed_wrapper)/urdf/$(arg camera_model).urdf" />
<node name="zed_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher">
<remap from="robot_description" to="zed_description" />
</node>
</group>
<node name="$(arg node_name)" pkg="zed_wrapper" type="zed_wrapper_node" output="screen" required="true"><!-- launch-prefix="valgrind" -->
<rosparam file="$(find zed_wrapper)/params/common.yaml" command="load" />
<rosparam file="$(find zed_wrapper)/params/$(arg camera_model).yaml" command="load" />
<!-- SVO file path -->
<param name="svo_file" value="$(arg svo_file)" />
<!-- Remote stream -->
<param name="stream" value="$(arg stream)" />
<!-- Publish ZED urdf -->
<param name="tracking/publish_tf" value="false" />
<param name="tracking/publish_map_tf" value="false" />
<!-- Camera ID -->
<param name="general/zed_id" value="$(arg camera_id)" />
<!-- GPU ID -->
<param name="general/gpu_id" value="$(arg gpu_id)" />
</node>
</group>
<node pkg="tf" type="static_transform_publisher" name="zed_left_camera_optical_frame" args="0 0 0 0 0 0 crane_block base_link 100" />
</launch>
And the ZED URDF File
<?xml version="1.0"?>
<robot name="zed_camera">
<!-- base_link -->
<link name="base_link" />
<!-- Camera Center -->
<joint name="zed_camera_center_joint" type="fixed">
<parent link="base_link"/>
<child link="zed_camera_center"/>
<origin xyz="0 0 0" rpy="0 0 0" />
</joint>
<link name="zed_camera_center">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://zed_wrapper/urdf/models/ZED.stl" />
</geometry>
<material name="light_grey">
<color rgba="0.8 0.8 0.8 0.8"/>
</material>
</visual>
</link>
<!-- Left Camera -->
<joint name="zed_left_camera_joint" type="fixed">
<parent link="zed_camera_center"/>
<child link="zed_left_camera_frame"/>
<origin xyz="0 0.06 0" rpy="0 0 0" />
</joint>
<link name="zed_left_camera_frame" />
<joint name="zed_left_camera_optical_joint" type="fixed">
<origin xyz ...
Have you made any progress with this? I have the same problem when I attach the zed to my base. My tf tree is correct but the origins are not correctly represented in rviz.
Yes, solve it. In the ZED launch the transform was not correct.
Hi, our team is working on a similar project. May I ask if we can use your urdf file to model the crane? We can also pay you a price if it is within our budget. Thanks!
you can email me. Or I can email you. What is your email?