I can see from the list of the topics that there is no controller topic for the wheels of your robot.
If you look into the description of your robot, you should find a transmission tags that are given the names of the drive wheels joints. Inside the gazebo tags you will find there is a plugin called libgazebo_ros_control
loaded. This plugin looks for the transmission tags to see what controllers it should load.
But you also need to set the controllers yourself (I'm not sure of the causality in this process, but this is what you need to do). So you need this controller configuration file and then you need to actually load it into your simulation.
That is supposed to be done by this file, however in this package the loading of the controller is commented out. I'm not sure what is the state in your local package. I cannot validate all of what is written in this file, but given everything else is correct, the file should look as follows:
<launch>
<arg name="name" default="p3dx"/>
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="init_yaw" default="0.0"/>
<arg name="namespace_arg" default=""/>
<arg name="tfprefix" default=""/>
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find p3dx_control)/config/pioneer3dx.yaml" command="load"/>
<!--<rosparam param="p3dx_velocity_controller/base_frame_id" subst_value="True">$(arg tfprefix)/base_link</rosparam>-->
<!-- load the controllers -->
<!-- THIS NEEDS TO BE UNCOMMENTED -->
<node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" ns="/$(arg namespace_arg)" args="joint1_position_controller joint2_position_controller joint_state_controller"/>
<!-- transform the robot's coordinates to map-->
<node pkg="tf" type="static_transform_publisher" name="map_odom_broadcaster" args="0 0 0 0 0 0 /map /$(arg tfprefix)/odom 100" />
<!-- convert joint states to TF transforms for rviz, etc -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="false" output="screen">
<remap from="/joint_states" to="/joint_states" />
</node>
</launch>
The last step is to launch the control (the file above), which is commonly done in the launch file where you spawn the robot. You can see the lines loading the controller launch file are commented out in this file as well (all the way at the bottom). So you would need to uncomment also this command.
<!-- ros_control p3rd launch file -->
<!-- <include file="$(find p3dx_control)/launch/control.launch" /> -->
What you want to see in your topic list are two topics named something like /p3dx/joint1_position_controller/command
and /p3dx/joint2_position_controller/command
. Those are the topics that any kind of keyboad operation node has to sent the target velocities in order to move your robot.
Originally posted by kumpakri with karma: 755 on 2019-08-15
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by cbdru_ros on 2019-08-15:
Hi! Thanks for the answer. I was able to get it to work after I used your solution AND reinstalling ros_control package for Ros melodic. There were some corrupted elements in that package that were causing the issue.