gazebo仿真时在加⼊差分运动插件后没有cmd_vel话题⼀、问题描述:
gazebo仿真时在加⼊差分运动插件后没有cmd_vel话题
joes@joes:~/jiao/ROS_Project$ roslaunch ros23_urdf02_gazebo demo03_gazebo_env.launch
... logging to /home/joes/.ros/log/6cceca6e-4837-11ec-9542-14f6d8d77445/roslaunch-joes-10392.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
SUMMARY
========
PARAMETERS
* /robot_description: <?xml version="1....
* /rosdistro: kinetic
* /rosversion: 1.12.17
* /use_sim_time: True
NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
spawn_model1 (gazebo_ros/spawn_model)
process[gazebo-1]: started with pid [10416]
process[gazebo_gui-2]: started with pid [10421]
process[spawn_model1-3]: started with pid [10426]
[ INFO] [1637235817.256610584]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1637235817.257288041]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised,
[ INFO] [1637235817.258918130]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1637235817.261062997]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised,
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/inputmethods/libqimsw-multi.so" keys ("imsw-multi")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/inputmethods/qtim-fcitx.so"
keys ("fcitx")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqgif.so"
keys ("gif")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqico.so"
keys ("ico")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqjpeg.so"
keys ("jpeg", "jpg")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqmng.so"
keys ("mng")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqsvg.so"
keys ("svg", "svgz")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqtga.so"
keys ("tga")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/imageformats/libqtiff.so"
keys ("tiff", "tif")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-
gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so"
keys ("QSPIACCESSIBLEBRIDGE")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-
gnu/qt4/plugins/accessible/libqtaccessiblecompatwidgets.so"
keys ("Q3TextEdit", "Q3IconView", "Q3ListView", "Q3WidgetStack", "Q3GroupBox", "Q3ToolBar", "Q
3ToolBarSeparator",
"Q3DockWindowHandle", "Q3DockWindowResizeHandle", "Q3MainWindow", "Q3Header", "Q3ListBox", "Q3Table",
"Q3TitleBar")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/accessible/libqtaccessiblewidgets.so" keys ("QSGItem", "QDeclarativeItem", "QLineEdit", "QComboBox", "QAbstractSpinBox", "QSpinBox", "QDoubleSpinBox", "QScrollBar", "QSlider", "QAbstractSlider", "QToolButton", "QCheckBox", "QRadioButton", "QPushButton", "QAbstractButton", "QDialog", "QMessageBox", "QMainWindow", "QLabel", "QLCDNumber", "QGroupBox", "QStatusBar", "QProgressBar", "QMenuBar", "Q3PopupMenu", "QMenu", "QHeaderView", "QTabBar", "QToolBar", "QWorkspaceChild", "QSizeGrip", "QAbstractItemView", "QWidget", "QSplitter", "QSplitterHandle", "QTextEdit", "QPlainTextEdit", "QTipLabel", "QFrame", "QStackedWidget", "QToolBox", "QMdiArea", "QMdiSubWindow", "QWorkspace", "QDialogButtonBox", "QDial", "QRubberBand", "QTextBrowser", "QAbstractScrollArea", "QScrollArea", "QCalendarWidget", "QDockWidget") QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/iconengines/libqsvgicon.so"
keys ("svg", "svgz", "")
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/iconengines/libqsvgicon.so"qt listview
keys ()
[ INFO] [1637235817.590847017]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1637235817.592469542]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1637235817.638523309, 257.499000000]: Physics dynamic reconfigure ready.
[ INFO] [1637235817.638917878]: Physics dynamic reconfigure ready.
[ INFO] [1637235818.010408784, 257.801000000]: Starting plugin DiffDrive(ns = //)
[ INFO] [1637235818.010504396, 257.801000000]: DiffDrive(ns = //): <rosDebugLevel> = Debug
[ INFO] [1637235818.011427144, 257.801000000]: DiffDrive(ns = //): <tf_prefix> =
[DEBUG] [1637235818.011538036, 257.801000000]: DiffDrive(ns = //): <commandTopic> = cmd_vel
[DEBUG] [1637235818.011553415, 257.801000000]: DiffDrive(ns = //): <odometryTopic> = odom
[DEBUG] [1637235818.011565311, 257.801000000]: DiffDrive(ns = //): <odometryFrame> = odom
[DEBUG] [1637235818.011592937, 257.801000000]: DiffDrive(ns = //): <robotBaseFrame> = base_footprint [DEBUG] [1637235818.011641657, 257.801000000]: DiffDrive(ns = //): <publishWheelTF> = true
[DEBUG] [1637235818.011653441, 257.801000000]: DiffDrive(ns = //): <publishOdomTF> = true
[DEBUG] [1637235818.011664179, 257.801000000]: DiffDrive(ns = //): <publishWheelJointState> = true
[DEBUG] [1637235818.011709383, 257.801000000]: DiffDrive(ns = //): <legacyMode> = true
[DEBUG] [1637235818.011758233, 257.801000000]: DiffDrive(ns = //): <wheelSeparation> = 0.2000
0000000000001 [DEBUG] [1637235818.011776872, 257.801000000]: DiffDrive(ns = //): <wheelDiameter> = 0.065000000000000002 [DEBUG] [1637235818.011825064, 257.801000000]: DiffDrive(ns = //): <wheelAcceleration> = 1.8
[DEBUG] [1637235818.011839057, 257.801000000]: DiffDrive(ns = //): <wheelTorque> = 30
[DEBUG] [1637235818.011853035, 257.801000000]: DiffDrive(ns = //): <updateRate> = 100
[ WARN] [1637235818.011902563, 257.801000000]: DiffDrive(ns = //): <odometrySource> no matching key to 1 [DEBUG] [1637235818.011918766, 257.801000000]: DiffDrive(ns = //): <odometrySource> = default := 1
[DEBUG] [1637235818.011945861, 257.801000000]: DiffDrive(ns = //): <leftJoint> = left_wheel_baselink
[spawn_model1-3] process has finished cleanly
log file: /home/joes/.ros/log/6cceca6e-4837-11ec-9542-14f6d8d77445/spawn_model1-3*.log
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt4/plugins/menubar/libappmenu-qt.so"
keys ("default")
[gazebo_gui-2] process has finished cleanly
log file: /home/joes/.ros/log/6cceca6e-4837-11ec-9542-14f6d8d77445/gazebo_gui-2*.log
^C[gazebo-1] killing on exit
[gazebo-1] escalating to SIGTERM
shutting down
... shutting down processing monitor complete
done
⼆、解决:
查看后台输出,未见明显报警,最后还是检查move.xacro⽂件,<gazebo></gazebo>标签内,左右驱动轮的名字错误,导致的。⾃⾏查看⾃⼰的⼩车base中的左右驱动轮的joint name,必须保持⼀致,我就是因为多加了⼀个下划线,导致摸索半天。
leftwheel_baselink 错写为 left_wheel_baselink
rightwheel_baselink 错写为 right_wheel_baselink
1.错误的书写:
2.base底盘⽂件的左右驱动轮关节名称:
修正后,重新执⾏:roslaunch ros23_urdf02_gazebo demo03_gazebo_env.launch
查询rostopic list,出现cmd_vel
⼤喜⼤喜~
其他同学遇见此问题,也可以类推,主要查相关的⼀些⾃命名参数的name是否前后⼀致,否则极易出错。因为随着后续项⽬的复杂加
深,相关的各类引⽤越来越多,所以必须要仔细书写,以免花费太多的⽆效时间进⾏排错!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论