Discussion - Concept Design URDF (Making a Mobile Robot Pt 2)

Blog Post

This is the discussion topic for the video and blog post linked above. Please keep all replies relevant to the content, otherwise create a new topic.

1 Like

vboxuser@linux1:~/dev_wc$ ros2 launch my_bot rsp.launch.py
ros2: command not found
i get the above error in the initial step, please help!!

After soutcing ros i got below error
Package ‘my_bot’ not found: “package ‘my_bot’ not found, searching: [‘/opt/ros/foxy’]”

It looks like you’ve either not built your workspace (with colcon) or not sourced it (with source install/setup.bash).

When you source the main ROS install (with source /opt/ros/foxy/setup.bash) that makes all the installed packages available but not ones you’ve built yourself. For those you need to source your local workspace (sometimes called an overlay) with source install/setup.bash (called from within the workspace) to make its packages available. It can get a bit confusing but once you are used to it it’s actually a very practical approach for working on multiple projects.

How would I prepare a diff robot with a caster at the back? I prepared one but the physical left wheel is shown on the right side in Rviz. How do I fix it? @JoshNewans

84% of storage used … You can clean up space or get more storage for Drive, Gmail, and Google Photos.
<?xml version='1.0'?>
<robot name="dd_robot">

  <!-- Base Link -->
  <link name="base_link">
    <visual>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <box size="0.6096 0.4191 0.07"/>
      </geometry>
      <material name="blue">
        <color rgba="0 0.5 1 1"/>
      </material>
    </visual>
    <!-- Base collision, mass and inertia -->
    <collision>
      <origin xyz="0 0 0" rpy="0 0 0" />
      <geometry>
        <box size="0.6096 0.4191 0.07"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="5"/>
      <inertia ixx="0.13" ixy="0.0" ixz="0.0" iyy="0.21" iyz="0.0" izz="0.13"/>
    </inertial>

    <!-- Caster -->
    <visual name="caster">
      <origin xyz="-0.3 0.0 -0.07" rpy="0 0 0" />
      <geometry>
        <sphere radius="0.0381" />
      </geometry>
    </visual>
    <!-- Caster collision, mass and inertia -->
    <collision>
      <origin xyz="-0.3 0.0 -0.07" rpy="0 0 0" />
      <geometry>
        <sphere radius="0.00381" />
      </geometry>
    </collision>
    <inertial>
      <mass value="0.5"/>
      <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
    </inertial>

  </link>

  <!-- Right Wheel -->
  <link name="right_wheel">
    <visual>
      <origin xyz="0 0 0"  rpy="1.570795 0 0" />
      <geometry>
        <cylinder radius="0.0762" length="0.04318"/>
      </geometry>
      <material name="darkgray">
        <color rgba=".2 .2 .2 1"/>
      </material>
    </visual>
    <!-- Right Wheel collision, mass and inertia -->
    <collision>
      <origin xyz="0 0 0"  rpy="1.570795 0 0" />
      <geometry>
        <cylinder radius="0.0762" length="0.04318"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="0.5"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>

  </link>

  <!-- Right Wheel joint -->
  <joint name="joint_right_wheel" type="continuous">
    <parent link="base_link"/>
    <child link="right_wheel"/>
    <origin xyz="0.2 0.24 0"  rpy="0 0 0" /> 
    <axis xyz="0 1 0" />
  </joint>

  <!-- Left Wheel -->
  <link name="left_wheel">
    <visual>
      <origin xyz="0 0 0"  rpy="1.570795 0 0" />
      <geometry>
        <cylinder radius="0.0762" length="0.04318"/>
      </geometry>
      <material name="darkgray">
        <color rgba=".2 .2 .2 1"/>
      </material>
    </visual>
    <!-- Left Wheel collision, mass and inertia -->
    <collision>
      <origin xyz="0 0 0" rpy="1.570795 0 0" />
      <geometry>
        <cylinder radius="0.0762" length="0.04318"/>
      </geometry>
    </collision>
    <inertial>
      <mass value="0.5"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.005" iyz="0.0" izz="0.005"/>
    </inertial>
  </link>

  <!-- Left Wheel joint -->
  <joint name="joint_left_wheel" type="continuous">
    <parent link="base_link"/>
    <child link="left_wheel"/>
    <origin xyz="0.2 -0.24 0"  rpy="0 0 0" /> 
    <axis xyz="0 1 0" />
  </joint>

  <link name="caster">
    <inertial>
            <mass value="1" />
            <inertia ixx="0.1316" ixy="0.0" ixz="0" iyy="0.1316" iyz="0" izz="0.01125" />
    </inertial>
    <visual>    
      <geometry>
        <sphere radius="0.0381" />
      </geometry>
      <material name="white" />
        <color rgba="1 1 1 1"/>
    </visual>
  </link>
  <joint name="caster_joint" type="continuous">
    <origin xyz="-0.3 0.0 -0.07" rpy="1.57 0.0 0.0"/>
    <parent link="base_link"/>
    <child link="caster"/>
  </joint>

  <link name="laser">
    <inertial>
            <mass value="1.0" />
            <inertia ixx="0.004375" ixy="0.0" ixz="0" iyy="0.004375" iyz="0" izz="0.005" />
    </inertial>
    <visual>	 
      <geometry>
        <cylinder radius="0.05" length="0.05"/>
      </geometry>
      <material name="grass">
        <color rgba="0.3607843137254902 0.6745098039215687 0.17647058823529413 1.0" />
      </material>
    </visual>
  </link>
  <joint name="laser_joint" type="fixed">
    <origin xyz="0.225 0 0.07" rpy="0 0 3.1416"/>
    <parent link="base_link"/>
    <child link="laser"/>
    <axis xyz="0.0 0.0 1.0"/>
  </joint>

</robot>

Josh,
Like everyone, I exceptionally greatful for the effort you’ve put into these tutorials.
I rushed through the first build out and then updated for humble. I may have something out of alignment as I restarted from the beginning on the tuturials. I have an issue my bot articubot_one2 builds fine, displays in rivz2 fine, but I can’t get it to show in Gazebo. I see my spawn in Gazebo, but there are no links associated with it. I don’t appear to get any errors on the spawn command. I do see a durability.policy warning, but it was suggested that wasn’t significant. Just wanted to ping you for any ideas? My goal is to complete this robot, then add gps and then build a vineyard model to map and explore a vineyard in preparation for automation.

error: “No tf data. Actual error. Frame [map] does not exist.”
I’m following this tutorial… in this video when I launch the rviz2 and while fixing the fixed frame to the base_link
There is the error I face …I cant find the base_link in the dropdown menu. The drop-down menu has nothing
if I manually type it as base_link then it shows “No tf data. Actual error. Frame [base_link] does not exist.”

can someone help me with this error?

thanks in advance!