How do I use this plug-in or any movement plug-in?

asked 2023-05-23 08:44:45 -0500

RichardVZ gravatar image

Melodic on Ubuntu 18.04 Simulation in gazebo I created a urdf for my robot and I can get the robot to spawn in gazebo. The robot is imbalanced but I wanted to get try and get the robot to move before I started fixing the balancing issues. The plug-in I'm using is libgazebo_ros_diff_drive.so I've tried publishing from the command line using this input

rostopic pub /cmd_vel geometry_msgs/Twist "linear: x: 0.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 1.0" -r 10

The robot just stays in one spot. The next part is my .urdf code

<robot name="CoRDS_bot">

<link name="box"> <visual> <geometry> <box size="0.5 0.5 0.5"/> </geometry> </visual> <collision> <geometry> <box size="0.5 0.5 0.5"/> </geometry> </collision> <inertial> <mass value="1.0"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.083" ixy="0.0" ixz="0.0" iyy="0.083" iyz="0.0" izz="0.083"/> </inertial> </link>

<joint name="left_wheel_joint" type="continuous"> <parent link="box"/> <child link="left_wheel"/> <origin rpy="0 0 0" xyz="-0.25 0 -0.25"/> <axis xyz="0 0 -1"/> </joint>

<link name="left_wheel"> <visual> <geometry> <cylinder length="0.1" radius="0.1"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.1" radius="0.1"/> </geometry> </collision> <inertial> <mass value="0.1"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial> </link>

<joint name="right_wheel_joint" type="continuous"> <parent link="box"/> <child link="right_wheel"/> <origin rpy="0 0 0" xyz="-0.25 0 0.25"/> <axis xyz="0 0 1"/> </joint>

<link name="right_wheel"> <visual> <geometry> <cylinder length="0.1" radius="0.1"/> </geometry> </visual> <collision> <geometry> <cylinder length="0.1" radius="0.1"/> </geometry> </collision> <inertial> <mass value="0.1"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial> </link>

<link name="camera_link"> <visual> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </visual> <collision> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <inertial> <mass value="0.01"/> <origin rpy="0 0 0" xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_joint" type="fixed"> <parent link="box"/> <child link="camera_link"/> <origin rpy="0 0 0" xyz="0.25 0 0"/> </joint>

<gazebo> ... (more)

edit retag flag offensive close merge delete