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.
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>