Hi Bayodesegun.
I am taking the course " URDF for robot modeling ROS2". However I was trying to build my own robot follwoing the instructions in the course but using my own laptop where I installed all needed software and tools.
The model that I built is spawned in Gazebo but trying to control it using teleop_twist_keyboard is very slow and does not turn left or right easily. So I don’t know what is the issue.
Also I have tried to replicate the same robot that is in the course but with bigger dimensions. in Gazebo my robot is showing upside down and when I select “Edit → Reset Model Poses” the robot orientation is fixed. However I need to know what is the reason that my simulated robot comes upside down? Below my URDF File:
<?xml version="1.0"?>
<collision>
<origin rpy="0 0 0" xyz="0 0 0" />
<geometry>
<box size="1.0 1.0 1.0"/>
</geometry>
</collision>
<inertial>
<mass value="5.0"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.8333333333333335" ixy="0" ixz="0" iyy="0.8333333333333335" iyz="0" izz="0.8333333333333335"/>
</inertial>
Gazebo/Blue
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.35"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.5"/>
<inertia ixx="1.531666666666667e-02" ixy="0" ixz="0" iyy="1.531666666666667e-02" iyz="0" izz="3.0625000000000006e-02"/>
</inertial>
1000000000000000000000000000.0
1000000000000000000000000000.0
10.0
10.0
Gazebo/Green
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.35"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.5"/>
<inertia ixx="1.531666666666667e-02" ixy="0" ixz="0" iyy="1.531666666666667e-02" iyz="0" izz="3.0625000000000006e-02"/>
</inertial>
1000000000000000000000000000.0
1000000000000000000000000000.0
10.0
10.0
Gazebo/Orange
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.045000000000000005"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="5.145833333333334e-06" ixy="0" ixz="0" iyy="5.145833333333334e-06" iyz="0" izz="1.0125000000000003e-05"/>
</inertial>
<gazebo reference="front_yaw_link">
<material>Gazebo/Blue</material>
</gazebo>
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.045000000000000005"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="5.145833333333334e-06" ixy="0" ixz="0" iyy="5.145833333333334e-06" iyz="0" izz="1.0125000000000003e-05"/>
</inertial>
<gazebo reference="front_roll_link">
<material>Gazebo/Red</material>
</gazebo>
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<sphere radius="0.10"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="4e-05" ixy="0" ixz="0" iyy="4e-05" iyz="0" izz="4e-05"/>
</inertial>
1000000000000000000000000000.0
1000000000000000000000000000.0
0.5
0.5
Gazebo/Purple
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.045000000000000005"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="5.145833333333334e-06" ixy="0" ixz="0" iyy="5.145833333333334e-06" iyz="0" izz="1.0125000000000003e-05"/>
</inertial>
<gazebo reference="back_yaw_link">
<material>Gazebo/Blue</material>
</gazebo>
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<cylinder length="0.01" radius="0.045000000000000005"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="5.145833333333334e-06" ixy="0" ixz="0" iyy="5.145833333333334e-06" iyz="0" izz="1.0125000000000003e-05"/>
</inertial>
<gazebo reference="back_roll_link">
<material>Gazebo/Red</material>
</gazebo>
<collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
<sphere radius="0.10"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<mass value="0.01"/>
<inertia ixx="4e-05" ixy="0" ixz="0" iyy="4e-05" iyz="0" izz="4e-05"/>
</inertial>
1000000000000000000000000000.0
1000000000000000000000000000.0
0.5
0.5
Gazebo/Yellow
~/out:=joint_states
30
joint_left_wheel
joint_right_wheel
<joint_name>front_yaw_joint</joint_name>
<joint_name>back_yaw_joint</joint_name>
<joint_name>front_roll_joint</joint_name>
<joint_name>back_roll_joint</joint_name>
<joint_name>front_pitch_joint</joint_name>
<joint_name>back_pitch_joint</joint_name>
</plugin>
<!-- wheels -->
<left_joint>joint_left_wheel</left_joint>
<right_joint>joint_right_wheel</right_joint>
<!-- kinematics -->
<wheel_separation>1</wheel_separation>
<wheel_diameter>0.7</wheel_diameter>
<!-- limits -->
<max_wheel_torque>1.0</max_wheel_torque>
<max_wheel_acceleration>2.0</max_wheel_acceleration>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>base_link</robot_base_frame>
</plugin>
<collision>
<origin rpy="0 0 0" xyz="0 0 0.0204"/>
<geometry>
<box size="0.74986 0.74935 0.408"/>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<origin rpy="0 0 0" xyz="0 0 0.204"/>
<inertia ixx="6.066578520833334e-03" ixy="0" ixz="0" iyy="6.072950163333333e-03" iyz="0" izz="9.365128684166666e-03"/>
</inertial>
0 0 0 0 0 0
200
1.0
-3.14
3.14
0.1
5.0
true
true
100.0
/rmod3
~/out:=laser_scan
sensor_msgs/LaserScan