base_footprint has negative position
Hi, I want to use the coordinates of "base_footprint" as origin. But Z-Coordinate is a negative value. Is there any way to make this origin?
I am a ros beginner. I would be very happy if you could advise me. (P.S) The following base_link assumes the CHASSIS of the vehicle. I am trying to test rtabmap with a RobotModel created in xacro.
<xacro:macro name="base">
<link name="base_footprint"/>
<link name="base_link">
<visual>
<geometry>
<box size="${base_len} ${base_width} ${base_height}"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<geometry>
<box size="${base_len} ${base_width} ${base_height}"/>
</geometry>
</collision>
<xacro:cuboid_inertia mass="${base_mass}" x="${base_len}" y="${base_width}" z="${base_height}" />
</link>
<!-- Joint to connect base_link with base_joint -->
<joint name="base_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0 0 ${base_origin_z}" rpy="0 0 0"/>
</joint>
</xacro:macro>
Asked by green bell pepper on 2022-11-01 05:16:24 UTC
Answers
I'am not 100% certain what you mean with
But Z-Coordinate is a negative value. Is there any way to make this origin?
At the moment i am assuming your problem is, that the base_link is colliding with the ground. Because the base_joint is placed at a negative z-coordinate. Therefore just change the value of ${base_origin_z}
e.g. by changing the sign -${base_origin_z}
Please update your question, to make it more understandable.
Asked by nils_iseke on 2022-11-02 01:23:06 UTC
Comments
Could you try to explain what you want to achieve in more detail? If you use this macro, the global origin and the origin of the base_footprint should be the same. The origin of the base_link is placed add the origin of the base_joint
<origin xyz="0 0 ${base_origin_z}" rpy="0 0 0"/>
. If you add more information i maybe can help you out more...Asked by nils_iseke on 2022-11-01 07:27:14 UTC
Hi nils_iseke, Thanks for the comment. I am trying to test SLAM with a vehicle (JetBot). In my research, I found information that base_footprint and base_link are categorized as follows. base_link : base of the robot base_footprint : Z-coordinate of "base_link" = 0 The "base_link" described above assumes the chassis of the vehicle.
I am a ros and slam newbie. I would be very happy if you could give me some advice.
Asked by green bell pepper on 2022-11-01 18:52:42 UTC