0
$\begingroup$

I am trying to make my own robot, I am using ROS2-humble on Ubuntu 22.04 with gazebo ignition fortress. so I came across this problem where the libignition-gazebo-diff-drive-system creates the topics tf and odometry successfully but doesn't create the topic cmd_vel:

abdosalm@abdosalm-Alienware-m17-R3:~/Github_repos/SLAM-mapping-Robots/workspace$ ign topic -l
/clock
/gazebo/resource_paths
/gui/camera/pose
/model/robot/odometry
/model/robot/tf
/stats
/world/CMP_department/clock
/world/CMP_department/dynamic_pose/info
/world/CMP_department/pose/info
/world/CMP_department/scene/deletion
/world/CMP_department/scene/info
/world/CMP_department/state
/world/CMP_department/stats

this is my urdf file related to gazebo plugins called gazeb_control.xacro:

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

    <gazebo>
        <plugin name="ignition::gazebo::systems::DiffDrive" filename="libignition-gazebo-diff-drive-system.so">
        <!-- <plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'> -->
   
            <!-- Wheel Information -->
            <left_joint>left_wheel_joint</left_joint>
            <right_joint>right_wheel_joint</right_joint>

            <!-- distance between centers of the wheel-->
            <wheel_separation>0.297</wheel_separation> 
            <wheel_diameter>0.066</wheel_diameter>

            <!-- Limits -->
            <max_wheel_torque>200</max_wheel_torque>
            <max_wheel_acceleration>10.0</max_wheel_acceleration>
            
            <!-- Output -->
            <odometry_frame>odom</odometry_frame>
            <robot_base_frame>base_link</robot_base_frame>
            
            <!-- publish odometry and transform of odometry -->
            <publish_odom>true</publish_odom>
            <publish_odom_tf>true</publish_odom_tf>
            <publish_wheel_tf>true</publish_wheel_tf>
            <!-- <topic>/model/robot1/cmd_vel</topic> -->

        </plugin>
        

    </gazebo>


</robot>

so what did I do wrong, since the topics tf and odometry were created successfully then the plugin is working but why wasn't cmd_vel created?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.