I've been following the Articulated Robotics tutorial series on a Raspberry Pi 4B with Ubuntu 22.04 after switching to ROS2 Humble. However, when it comes to using the teleop_twist_keyboard to move the robot in Gazebo, I just can't get mine to move! Running ros2 topic info /cmd_vel while both the launch files and the teleop_twist_keyboard are running tells me that there are no nodes subscribed to it. But a namespace isn't set and in the tutorial it works right away, so I don't know why this is the case. Here are my files so far:


import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription, ExecuteProcess
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node

def generate_launch_description():
    package_name='robot' #<--- CHANGE ME

    rsp = IncludeLaunchDescription(
                )]), launch_arguments={'use_sim_time': 'true'}.items()

    gazebo = ExecuteProcess(
        cmd=['ign', 'gazebo', 'empty.sdf'],

    spawn_entity = Node(package='ros_gz_sim', executable='create',
                        arguments=['-topic', 'robot_description',
                                   '-entity', 'robot'],

#    diff_drive_spawner = Node(
#        package="controller_manager",
#        executable="spawner",
#        arguments=["diff_cont"],
#    )
#    joint_broad_spawner = Node(
#        package="controller_manager",
#        executable="spawner",
#        arguments=["joint_broad"],
#    )

    return LaunchDescription([
#        diff_drive_spawner,
#        joint_broad_spawner


import os

from ament_index_python.packages import get_package_share_directory

from launch import LaunchDescription
from launch.substitutions import LaunchConfiguration
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import Node

import xacro

def generate_launch_description():

    # Check if we're told to use sim time
    use_sim_time = LaunchConfiguration('use_sim_time')

    # Process the URDF file
    pkg_path = os.path.join(get_package_share_directory('robot'))
    xacro_file = os.path.join(pkg_path,'description','robot.urdf.xacro')
    robot_description_config = xacro.process_file(xacro_file)
    # Create a robot_state_publisher node
    params = {'robot_description': robot_description_config.toxml(), 'use_sim_time': use_sim_time}
    node_robot_state_publisher = Node(

    # Launch!
    return LaunchDescription([
            description='Use sim time if true'),



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

    <xacro:include filename="robot_core.xacro" />
    <xacro:include filename="gazebo_control.xacro"/>
    <xacro:include filename="lidar.xacro"/>



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

        <plugin filename="libignition-gazebo-diff-drive-system.so" name="ignition::gazebo::systems::DiffDrive">




As I'm working with arm64, I couldn't get Gazebo Classic, which is what's used in the tutorial, but I don't see why this would stop working.


1 Answer 1


Gazebo Fortress is totally different from Gazebo Classic, and so are also the plugins. Have you had a look into the documentation? It seems that you need other parameters, like the topic parameter.

Have a look at the code to get a list of all parameters.

Are there any error messages in the console output when you launch gazebo/spawn your model? Furthermore, gz topics are not available in ROS automatically, and vice versa. See the docs.

  • $\begingroup$ Okay, thank you. I followed the tutorials and managed to get my robot moving. But is this Gazebo system compatible with Rviz? And with Nav2? $\endgroup$ Commented Jun 29 at 13:39
  • $\begingroup$ Gazebo Classic (gazebo_ros2_control) and Gazebo (ign_ros2_control/gz_ros2_control) are both "compatible". The communication therefore is limited only to a couple of topics. $\endgroup$ Commented Jul 2 at 7:45

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.