之前的博客中,我们使用rviz进行了TurtleBot的仿真,而且使用urdf文件建立了自己的机器人smartcar,本篇博客是将两者进行结合,使用smartcar机器人在rviz中进行仿真。
一、模型完善
之前我们使用的都是urdf文件格式的模型,在很多情况下,ROS对urdf文件的支持并不是很好,使用宏定义的.xacro文件兼容性更好,扩展性也更好。所以我们把之前的urdf文件重新整理编写成.xacro文件。
.xacro文件主要分为三部分:
.xacro文件主要分为三部分:
1、机器人主体
<?xml version="1.0"?>
<robot name="smartcar" xmlns:xacro="http://ros.org/wiki/xacro">
<property name="M_PI" value="3.14159"/>
<!-- Macro for SmartCar body. Including Gazebo extensions, but does not include Kinect -->
<include filename="$(find smartcar_description)/urdf/gazebo.urdf.xacro"/>
<property name="base_x" value="0.33" />
<property name="base_y" value="0.33" />
<xacro:macro name="smartcar_body">
<link name="base_link">
<inertial>
<origin xyz="0 0 0.055"/>
<mass value="1.0" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<box size="0.25 .16 .05"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0.055"/>
<material name="blue">
<color rgba="0 0 .8 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0.055"/>
<geometry>
<box size="0.25 .16 .05" />
</geometry>
</collision>
</link>
<link name="left_front_wheel">
<inertial>
<origin xyz="0.08 0.08 0.025"/>
<mass value="0.1" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin rpy="0 1.57075 1.57075" xyz="0.08 0.08 0.025"/>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
</collision>
</link>
<joint name="left_front_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="left_front_wheel"/>
<origin rpy="0 1.57075 1.57075" xyz="0.08 0.08 0.025"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<link name="right_front_wheel">
<inertial>
<origin xyz="0.08 -0.08 0.025"/>
<mass value="0.1" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin rpy="0 1.57075 1.57075" xyz="0.08 -0.08 0.025"/>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
</collision>
</link>
<joint name="right_front_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="right_front_wheel"/>
<origin rpy="0 1.57075 1.57075" xyz="0.08 -0.08 0.025"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<link name="left_back_wheel">
<inertial>
<origin xyz="-0.08 0.08 0.025"/>
<mass value="0.1" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin rpy="0 1.57075 1.57075" xyz="-0.08 0.08 0.025"/>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
</collision>
</link>
<joint name="left_back_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="left_back_wheel"/>
<origin rpy="0 1.57075 1.57075" xyz="-0.08 0.08 0.025"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<link name="right_back_wheel">
<inertial>
<origin xyz="-0.08 -0.08 0.025"/>
<mass value="0.1" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
<material name="black">
<color rgba="0 0 0 1"/>
</material>
</visual>
<collision>
<origin rpy="0 1.57075 1.57075" xyz="-0.08 -0.08 0.025"/>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
</collision>
</link>
<joint name="right_back_wheel_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="base_link"/>
<child link="right_back_wheel"/>
<origin rpy="0 1.57075 1.57075" xyz="-0.08 -0.08 0.025"/>
<limit effort="100" velocity="100"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>
<link name="head">
<inertial>
<origin xyz="0.08 0 0.08"/>
<mass value="0.1" />
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
<visual>
<geometry>
<box size=".02 .03 .03"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<origin xyz="0.08 0 0.08"/>
<geometry>
<cylinder length=".02" radius="0.025"/>
</geometry>
</collision>
</link>
<joint name="tobox" type="fixed">
<parent link="base_link"/>
<child link="head"/>
<origin xyz="0.08 0 0.08"/>
</joint>
</xacro:macro>
</robot>
2、gazebo属性部分
<?xml version="1.0"?>
<robot xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://ros.org/wiki/xacro"
name="smartcar_gazebo">
<!-- ASUS Xtion PRO camera for simulation -->
<!-- gazebo_ros_wge100 plugin is in kt2_gazebo_plugins package -->
<xacro:macro name="smartcar_sim">
<gazebo reference="base_link">
<material>Gazebo/Blue</material>
</gazebo>
<gazebo reference="right_front_wheel">
<material>Gazebo/FlatBlack</material>
</gazebo>
<gazebo reference="right_back_wheel">
<material>Gazebo/FlatBlack</material>
</gazebo>
<gazebo reference="left_front_wheel">
<material>Gazebo/FlatBlack</material>
</gazebo>
<gazebo reference="left_back_wheel">
<material>Gazebo/FlatBlack</material>
</gazebo>
<gazebo reference="head">
<material>Gazebo/White</material>
</gazebo>
</xacro:macro>
</robot>
<xml version="1.0"?>
<robot name="smartcar"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
xmlns:renderable="http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable"
xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
xmlns:xacro="http://ros.org/wiki/xacro">
<include filename="$(find smartcar_description)/urdf/smartcar_body.urdf.xacro" />
<!-- Body of SmartCar, with plates, standoffs and Create (including sim sensors) -->
<smartcar_body/>
<smartcar_sim/>
</robot>
在launch文件中要启动节点和模拟器。
<launch>
<param name="/use_sim_time" value="false" />
<!-- Load the URDF/Xacro model of our robot -->
<arg name="urdf_file" default="$(find xacro)/xacro.py '$(find smartcar_description)/urdf/smartcar.urdf.xacro'" />
<arg name="gui" default="false" />
<param name="robot_description" command="$(arg urdf_file)" />
<param name="use_gui" value="$(arg gui)"/>
<node name="arbotix" pkg="arbotix_python" type="driver.py" output="screen">
<rosparam file="$(find smartcar_description)/config/smartcar_arbotix.yaml" command="load" />
<param name="sim" value="true"/>
</node>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" >
</node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher">
<param name="publish_frequency" type="double" value="20.0" />
</node>
<!-- We need a static transforms for the wheels -->
<node pkg="tf" type="static_transform_publisher" name="odom_left_wheel_broadcaster" args="0 0 0 0 0 0 /base_link /left_front_link 100" />
<node pkg="tf" type="static_transform_publisher" name="odom_right_wheel_broadcaster" args="0 0 0 0 0 0 /base_link /right_front_link 100" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find smartcar_description)/urdf.vcg" />
</launch>
首先运行lanuch,既可以看到rviz中的机器人:
roslaunch smartcar_description smartcar_display.rviz.launch

发布一条动作的消息。
评论列表(150条)
老师,请教一下出现这个问题是什么原因呢?[ WARN] [1609759974.526189634]: Joint state with name: “base_l_wheel_joint” was received but not found in URDF
老师我在进行Gazebo中显示机器人模型时出现了以下提示
xacro: in-order processing became default in ROS Melodic. You can drop the option.
Deprecated: xacro tag ‘mrobot_body’ w/o ‘xacro:’ xml namespace prefix (will be forbidden in Noetic)
when processing file: /home/wxy/catkin_ws/src/mrobot_gazebo/urdf/mrobot.urdf.xacro
Use the following command to fix incorrect tag usage:
find . -iname “*.xacro” | xargs sed -i ‘s#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g' 然后就没法在gazebo中加载机器人模型,我应该怎么修改呢?希望老师能帮我看一下,谢谢老师了!
我也是这个问题,请问您解决了吗?
同,求解
[ERROR] [1592906300.394434798]: No link elements found in urdf file
[robot_state_publisher-3] process has died [pid 28638, exit code 255, cmd /opt/ros/kinetic/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/hnf/.ros/log/10f8f7b6-b538-11ea-a025-18cf5ebf00f8/robot_state_publisher-3.log].
log file: /home/hnf/.ros/log/10f8f7b6-b538-11ea-a025-18cf5ebf00f8/robot_state_publisher-3*.log
老师,您好,我urdf变成xacro德时候,总是提示这样德错误,请问这是什么原因呢?
老师您好,我照您的教程在kinetic上试着跑了一下,可以正常运行,但是发现没有cmd_vei话题,这样我就没法控制小车了,请问是什么原因呢?这是我的运行信息
roslaunch smartcar_description smartcar_display.rviz.launch
… logging to /home/cly/.ros/log/205eb5de-90f2-11ea-bae0-b8819871796a/roslaunch-cly-Lenovo-ideapad-Y700-15ISK-12312.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.
deprecated: xacro tags should be prepended with 'xacro' xml namespace.
Use the following script to fix incorrect usage:
find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g' when processing file: /home/cly/catkin_ws/src/smartcar_description/urdf/smartcar.urdf.xacro started roslaunch server http://localhost:38427/
SUMMARY
========
PARAMETERS
* /arbotix/sim: True
* /robot_description:
SUMMARY
========
PARAMETERS
* /arbotix/sim: True
* /robot_description:
需要检查有没有配置好ArbotiX的配置参数,就是yaml文件
学长再请教一个问题
No transform from [] to [odom]
感觉tf设置有问题吧
想请问一下,我听了你的sw转urdf文件,我把小车模型倒进去rviz里面了,那我该如何创建odom坐标系呢,您后面的课程都是基于手写的urdf 文件来讲的
学长,我这只有一个警告,但是不显示模型
deprecated: xacro tags should be prepended with ‘xacro’ xml namespace.
感觉是模型里的头内容不对吧
模型显示了,但是发布速度后机器人还是不动,节点图也没有问题,请问要怎么解决呢
朋友,我出现了和你一样的问题,请问你是如何解决的?
老师,我把代码修改后用gazebo打开报错,请问怎么解决呢?
Traceback (most recent call last):
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py”, line 306, in main
p.start()
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 268, in start
self._start_infrastructure()
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 217, in _start_infrastructure
self._load_config()
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py”, line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py”, line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py”, line 749, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py”, line 721, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py”, line 665, in _recurse_load
self._param_tag(tag, context, ros_config, verbose=verbose)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py”, line 95, in call
return f(*args, **kwds)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py”, line 265, in _param_tag
value = self.param_value(verbose, name, ptype, *vals)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/loader.py”, line 491, in param_value
p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
File “/usr/lib/python2.7/subprocess.py”, line 711, in __init__
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1343, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
我的launch文件
package文件:
好像是某个文件的权限不对
谢谢老师,我已经解决了
但是老师我又遇到了个问题,我给cmd_vel发指令,车只能直线运动,z方向的转动给了但是车不转弯,只能前进后退,我就是用了libgazebo_ros_skid_steer_drive.so插件,四个轮子的joint都配置了驱动。请问您知道哪个地方有问题吗,谢谢。
老师我已经解决了,摩擦力的问题
你好,请问一下,为什么发布/cmd_vel指令之后,车子会动,但是车轮不转,我该如何让车轮这个joint转动?谢谢。
用arbotix是这样的,并不仿真轮子的转动,可以配置ros_control+gazebo,每个轮子一个速度控制器,就可以看到转动了
胡老师,您好!按照你的书运行了gazebo模型仿真出现错误,请问怎么解决?
ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/stryear/catkin_ws/src
ROS path [2]=/home/stryear/Code/rgbdslam_catkin_ws/src
ROS path [3]=/opt/ros/kinetic/share
缺少joint_state_publisher节点,apt安装
Invalid tag: mrobot_description
ROS path [0]=/opt/ros/kinetic/share/ros
您好,我在运行真实机器人包的时候出现以下问题,请问是什么原因呢?
ROS path [1]=/home/j11218gpu/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share.
Arg xml is
The traceback for the exception was written to the log file
老师,这个config/smartcar_arbotix.yaml文件哪来的呢?
这个是自己做的控制器配置文件
您好,我在运行roslaunch的时候没有出现rviz只出现了下面的代码,请您指教
$ roslaunch display_mrobot_chassis_urdf.launch
… logging to /home/cervo/.ros/log/4d42a548-537b-11e9-8b63-f0761ce1216f/roslaunch-cervo-6625.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.
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 306, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 749, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 721, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 665, in _recurse_load
self._param_tag(tag, context, ros_config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 257, in _param_tag
vals = self.opt_attrs(tag, context, ('value', 'textfile', 'binfile', 'command'))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 202, in opt_attrs
return [self.resolve_args(tag_value(tag,a), context) for a in attrs]
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args
resolved = _resolve_args(resolved, context, resolve_anon, commands)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args
resolved = commands[command](resolved, a, args, context)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find
source_path_to_packages=source_path_to_packages)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable
full_path = _get_executable_path(rp.get_path(args[0]), path)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: mrobot_description
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/cervo/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
环境变量配置的问题吧,包找不到
我也是ResourceNotFound: smartcar_description
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share
ROS path [2]=/home/freedom/catkin_ws/
,catkin_make,source都试过了。
按照第二种转换方法,直接调用xacro文件解析器,也无法启动rviz加载模型,mrobot.urdf.xacro、mrobot_body.urdf.xacro,display_mrobot.launch三个文件代码都用的你的源码,请帮忙看看是什么原因,谢谢!
aicrobo@ubuntu:~/catkin_ws/src/mrobot_description/urdf$ roslaunch mrobot_description display_mrobot.launch
… logging to /home/aicrobo/.ros/log/128f2894-f0bc-11e8-94d5-000c291da2b8/roslaunch-ubuntu-5646.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.
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/lib/xacro/xacro –inorder ‘/home/aicrobo/catkin_ws/src/mrobot_description/urdf/mrobot.urdf.xacro’] returned with code [2].
Param xml is
The traceback for the exception was written to the log file
你好,老师按照你的书籍,在进行6.3.4章节,将xacro转换成URDF文件时,出错,转换的mrobot.urdf文件是空的aicrobo@ubuntu:~/catkin_ws/src/mrobot_description/urdf$ rosrun xacro xacro.py mrobot.urdf.xacro > mrobot.urdf
Traceback (most recent call last):
File “/opt/ros/indigo/share/xacro/xacro.py”, line 60, in
xacro.main()
File “/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py”, line 706, in main
open_output(output_filename).write(doc.toprettyxml(indent=’ ‘))
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 468-469: ordinal not in range(128)
应该是文件格式的问题,需要转换成linux格式,用vim等工具就可以转换,vim打开文件后输入命令“:set fileformat=unix”
古月,您好!我学习了您的教程,并且按照您的教程尝试了运行之后,出现了以下的问题,已经用rosrun 测试过smartcar.urdf.xacro文件,未显示出有问题,但是运行launch文件之后,参数robot_description一直无法显示为空,非常希望能够得到您的解答。谢谢!
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py ‘~/catkin_ws/src/smartcar_description/urdf/smartcar.urdf.xacro’] returned with code [1].
robot_description参数是在launch文件里设置的模型路径,你看下launch里边设置了么
我也出现了这个问题,我后来发现是因为我的.xacro文件里面用了中文去注释,我去除中文注释后,就可以跑通了,希望对你有帮助
不好意思,两句代码为:
target_link_libraries(cmdvel_to_cmdvelmux
${catkin_LIBRARIES}
古月老师,不好意思,评论没有发完整。我在做turtlebot自主探索建图的过程中,在编译时出错了。提醒我CMakeists文件中的这两行代码出错。提示我cmdvel_to_cmdvelmux的链接库失败。请问您遇见过这个问题吗?如果有什么建议,谢谢告知了
cmdvel_to_cmdvelmux是一个功能名字么?请检查是否有拼写错误,或者缺少空格
古月老师,您好,我在暑期学校听了很多您的很多东西。最近在做有关turtlebot的自主探索建图模式,有两个问题,请问您遇见过以下这两种情况吗?
一种是当我运行launch文件:roslaunch turtlebot_exploration_3d minimal_explo.launch时,出现了跟之前一位同志一样的错误:
xacro: Traditional processing is deprecated. Switch to –inorder processing!
To check for compatibility of your document, use option –check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
unused args [zeroconf_name] for include of [/opt/ros/kinetic/share/rocon_app_manager/launch/standalone.launch]
这导致无法运行launch文件。
第二种情况是当我对软件进行编译时提示我CMakelist中下面两句代码中有错:
target_link_libraries(
${catkin_LIBRARIES}
提示我找不到有关cmdvel_to_cmdvelmux的链接库。
请问您遇到过这两种问题吗?您当时怎么解决的?如果有建议的话谢谢告知
1. 在launch加载urdf的地方,需要加上–inorder配置参数
2. cmdvel_to_cmdvelmux是一个功能名字么?请检查是否有拼写错误,或者缺少空格
我也遇到过同样的问题,请问,那个“1. 在launch加载urdf的地方,需要加上–inorder配置参数”到底是什么意思呢,是在命令行上加上–inorder 吗,还是修改launch文件呢。
您好,我正在使用kinetic版本学习您这一章节,在前一章节学习很顺利,但在这一节根据catkin_make编译安装了几个配置,再次运行这一步骤时出现了这样但错误:
ResourceNotFound: urdf_tutorial
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/wendongli/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
以及joint_state_publisher和robot_state_publisher的错误:
ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/wendongli/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: robot_state_publisher
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/wendongli/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
确定这些包都安装了么?
@古月 大神,在学习你的第五章节时,仿真还是可以运行的,但在这一节,我根据需要安装了gazebo、ros-kinetic-roslint和ros-kinetic-gazebo-ros 然后再运行就出现了这样的问题
难道是我按装这些配置时把上边的包删掉了? 我重新安装下试试,谢谢
大神,我重新安装了这几个包,原先但问题解决了,但是又引入了新的问题process[joint_state_publisher-2]: started with pid [30285]
process[robot_state_publisher-3]: started with pid [30296]
process[rviz-4]: started with pid [30297]
[robot_state_publisher-3] process has died [pid 30296, exit code -11, cmd /opt/ros/kinetic/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/wendongli/.ros/log/fd12b350-c05f-11e8-b106-a0c589acc227/robot_state_publisher-3.log].
log file: /home/wendongli/.ros/log/fd12b350-c05f-11e8-b106-a0c589acc227/robot_state_publisher-3*.log
看错误提示是robot_state_publisher这个节点跑飞了,但是原因看不出来
大神你好,我从一个机器人官网下载了一个大包,里面有个mico_arm.urdf.xacro我想把它转成urdf格式。进入这个包的地址调用命令rosrun xacro xacro.py mico_arm.urdf.xacro >mico_arm.urdf。
但是始终报错
xacro: Traditional processing is deprecated. Switch to –inorder processing!
To check for compatibility of your document, use option –check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
请问这该怎么办?
在命令后边加上–inorder选项试一下
换了之后输入的命令 rosrun xacro xacro–inorder mico_arm.urdf.xacro > mico.urdf会生成一个文档,但是打开后发现里面只有如下一行文字:
[rosrun] Couldn’t find executable named xacro–inorder below /opt/ros/indigo/share/xacro
请问这是什么问题??怎么解决??谢谢大神
我现在系统版本是16.04的,从14.04升级到16.04的。
又试了遍显示[rosrun] Couldn’t find executable named xacro–inorder below /opt/ros/kinetic/share/xacro
在第二个xacro后边应该有空格的
谢谢大神,我试了,还是同样的结果,打开后里面有开头结尾的格式,但是中间部分还是没有具体描述。这是什么原因?
确定xacro模型没有问题么,你试下这样呢:
rosrun xacro xacro –inorder -o “$MYROBOT_NAME”.urdf “$MYROBOT_NAME”.xacro
大神好,我对你上面这个命令不是很理解,试了几次,可能是我没理解上面命令没输对正确命令把。
按照您上面给的命令按照我的理解试着不同的输入后基本上都是显示:
xacro: error: expected exactly one input file as argument
个别的尝试显示:
Usage: xacro [options]
xacro: error: expected exactly one input file as argument
Usage: xacro [options]
xacro: error: expected exactly one input file as argument
不懂了。。。
上面那个options后面少了个不知道怎么复制粘贴进这个评论框就是显示不出来
input 带尖括号的无法显示出来
我今天在运行roslunch的时候,也出现了这个报错。看了您的解答,摸索着在相关包的launch/include 下的xbot-u.launch.xml中添加了 –inorder
问题虽然解决了,但是不太明白出现这个问题的原因,因为之前都是好好的,或者是因为我不小心输入了别的而导致这个错误。
–inorder是ROS解析模型时的参数配置,melodic版本之后系统默认是添加的
建议你还是上网搜一下这个命令的使用方法吧,只要模型没错,这个命令是可以做转换的,经常用的
大神你好,在输入命令rostopic pub -r 10 /cmd_vel geometry_msgs/Twist ‘{linear: {x: 0.5, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}’后小车依然没有动起来,有什么解决办法呢
首先检查小车是否启动成功,然后检查速度控制的话题是否和发布的一致
如果没别的错误,小车不动应该是rviz的坐标系没配置好,小车实际上在动,但是网格跟着一起动,所以看不出来:把global option的fixed frame和右边view里的target rame坐标系设置好,就能动里。
是的 我把我的fixed frame 改成odom就可以了
古月大神,我想问一下,你这个智能小车在发布消息rostopic pub -r 10 /cmd_vel geometry_msgs/Twist ‘{linear: {x: 0.5, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}’ 会运动,那那文件是不是提前编译过度吧,如果是,文件在哪里
这个是命令行,没有文件需要编译,如果是写代码的话才需要编译
好,谢谢,不过我想请教下有没有类似的命令行,除开上面的消息,也能实现运动,我现在在自己探索,有代码的话可以参考一下
参考:
#include “ros/ros.h”
#include “std_msgs/String.h”
#include “geometry_msgs/Twist.h”
#include
int main(int argc, char **argv)
{
ros::init(argc, argv, “talker”);
ros::NodeHandle n;
ros::Publisher cmd_pub = n.advertise(“turtle1/cmd_vel”, 1000);
ros::Rate loop_rate(10);
int count = 0;
while (ros::ok())
{
geometry_msgs::Twist cmd;
cmd.linear.x = 0.2;
cmd_pub.publish(cmd);
ros::spinOnce();
loop_rate.sleep();
++count;
}
return 0;
}
大神,这个rostopic pub -r 10 /cmd_vel geometry_msgs/Twist ‘{linear: {x: 0.5, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}’ 消息能修改一下让小车做曲线运动吗
这个只能设置角速度和线速度,要做曲线运动需要写代码来控制
多谢指教,不过如果我想具体写的的话,请问具体如何写代码实现,还是类似上面的发布消息吗
具体的代码实现,你得先看ros wiki学习基础,然后看下已有的英文教程,熟悉了编程方法后就知道怎样通过代码实现消息的发布了。
您好,古月大师。有个疑问,以上教程的最后一步的节点关系中,/arbotix发布的/odom主题是怎么实现的?有什么具体意义?跟这个小车模型有什么关联吗?ROS新手,谢谢指教!
这个是arbotix_driver那个节点实现的,可以去看下它的代码,就是通过接收到的速度指令,理论计算得到的模型的里程计信息,并且发布odom话题,并不能代表实际情况,只是一种简单的功能仿真,一般用来测试导航等功能。
创建的xzcro文件名字叫什么啊?上面三段代码都写到一个xacro文件里吗?新手求指导啊
直接看这个包:http://download.csdn.net/detail/darkmoonkiller/9662483
出现这个错误怎么办啊?求帮忙,,古月哥running rosparam delete /arbotix
ERROR: parameter [/arbotix] is not set
ERROR: cannot launch node of type [arbotix_python/arbotix_driver]: arbotix_python
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/yang/dev/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
arbotix_python包没有安装,Kinetic版本里要下源码编译安装
我输入roslaunch smartcar_description smartcar_display.rviz.launch时候,rviz里面出现Global Status:Error。机器人只有一个长方体外壳。
终端出现错误:
ERROR: cannot launch node of type [arbotix_python/arbotix_driver]: arbotix_python
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/yan/catkin_ws/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
我也遇到同样的问题,请问你是怎么解决的??
解决了,谢谢!
是怎么解决的?
大佬你好~我刚开始学习ROS,用的Ubuntu16.04,在执行roslaunch rbx1_bringup fake_turtlebot.launch的时候,出现了这个错误:running rosparam delete /arbotix
process[arbotix-1]: started with pid [8903]
process[robot_state_publisher-2]: started with pid [8904]
Traceback (most recent call last):
File “/home/thea/catkin_ws/src/arbotix_ros/arbotix_python/bin/arbotix_driver”, line 37, in
from arbotix_python.diff_controller import DiffController
File “/home/thea/catkin_ws/src/arbotix_ros/arbotix_python/src/arbotix_python/diff_controller.py”, line 38, in
from tf.broadcaster import TransformBroadcaster
File “/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py”, line 29, in
from listener import Transformer, TransformListener, TransformerROS
File “/opt/ros/kinetic/lib/python2.7/dist-packages/tf/listener.py”, line 29, in
import numpy
File “/usr/lib/python2.7/dist-packages/numpy/__init__.py”, line 180, in
from . import add_newdocs
File “/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py”, line 13, in
from numpy.lib import add_newdoc
File “/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py”, line 8, in
from .type_check import *
File “/usr/lib/python2.7/dist-packages/numpy/lib/type_check.py”, line 11, in
import numpy.core.numeric as _nx
File “/usr/lib/python2.7/dist-packages/numpy/core/__init__.py”, line 14, in
from . import multiarray
ImportError: cannot import name multiarray
我numpy、matplotlib都下了,路径也添加到PYTHONPATH里了还是不行呢
所以想问一下,这是什么原因?应该怎么解决呢?谢谢啦~
重启电脑了么?参考下:
https://stackoverflow.com/questions/21324426/numpy-build-fails-with-cannot-import-multiarray
https://github.com/numpy/numpy/issues/9047
你好,根据您的教程,我输入rostopic pub -r 10 /cmd_vel geometry_msgs/Twist ‘{linear: {x: 0.5, y: 0, z: 0}, angular: {x: 0, y: 0, z: 0.5}}’
rviz中的小车没有运动,请问怎么回事?
我在输入roslaunch smartcar_description smartcar_display.rviz.launch
也会出现下面的问题,但是rviz也会正常启动
xacro: Traditional processing is deprecated. Switch to –inorder processing!
To check for compatibility of your document, use option –check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
xacro的问题应该是一个警告,可以在launch文件中把xacro.py改成xacro,并且加上–inorder。
检查一下模型启动后有没有订阅cmd_vel消息,arbotix是否启动成功
如果没别的错误,小车不动应该是rviz的坐标系没配置好,小车实际上在动,但是网格跟着一起动,所以看不出来:把global option的fixed frame和右边view里的target rame坐标系设置好,就能动里。
大神你好,我输入roslaunch smartcar_description smartcar_display.rviz.launch
出现这样的错误:
[smartcar_display.rviz.launch] is neither a launch file in package [smartcar_description] nor is [smartcar_description] a launch file name
The traceback for the exception was written to the log file
请问哪里出问题了?
进入smartcar_display.rviz.launch所在目录,然后执行roslaunch smartcar_display.rviz.launch就可以
古月大神,您好,请教一下 ,我这里报错找不到文件smartcar_arbotix.yaml,这是为什么?我用的是kinetic,谢谢
用这个试试:http://download.csdn.net/detail/darkmoonkiller/9662483
你好古月,想问一下,文件里面的那些xmlns是什么作用?然后这里没有用到gazebo为什么还需要它的配置文件?
哦,这里是不需要
这些现在的ROS版本里已经不需要了
这里面的effor什么意思呀
力,参考:http://wiki.ros.org/pr2_controller_manager/safety_limits
你好,古月大神,我在输入roslaunch smartcar_description smartcar_display.rviz.launch时候,出现了错误:
Traceback (most recent call last):
File “/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py”, line 225, in main
args = rlutil.resolve_launch_arguments(args)
File “/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/rlutil.py”, line 92, in resolve_launch_arguments
resolved = roslib.packages.find_resource(args[0], args[1])
File “/opt/ros/indigo/lib/python2.7/dist-packages/roslib/packages.py”, line 495, in find_resource
pkg_path = rospack.get_path(pkg)
File “/usr/lib/python2.7/dist-packages/rospkg/rospack.py”, line 201, in get_path
self._update_location_cache()
File “/usr/lib/python2.7/dist-packages/rospkg/rospack.py”, line 184, in _update_location_cache
list_by_path(self._manifest_name, path, cache)
File “/usr/lib/python2.7/dist-packages/rospkg/rospack.py”, line 67, in list_by_path
root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
File “/usr/lib/python2.7/xml/etree/ElementTree.py”, line 611, in __init__
self.parse(file)
File “”, line 38, in parse
ParseError: not well-formed (invalid token): line 11, column 16
看上去像是文件格式的问题
你好,我也出现了一样的问题,请问文件格式有什么样的问题?
你好,我输入roslaunch smartcar_description smartcar_display.rviz.launch时候,rviz里面出现Global Status:Error。机器人只有一个长方体外壳。
终端出现错误:
ERROR: cannot launch node of type [arbotix_python/arbotix_driver]: arbotix_python
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/yan/catkin_ws/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
arbotix使用apt-get安装,下新版的代码,参考:http://download.csdn.net/detail/darkmoonkiller/9662483
你好,古月大神,我是新手,我想问问你当时遇到编译错误时候,百度都百度不出来的时候,一般是通过什么途径解决问题的呀?
当然是用google神器, 还有ros answers等国外网站
古月大哥,你是用什么翻墙软件的呀?
我用Lantern付费版
古月大哥,你是在ubuntu下装对的Lantern翻墙软件,还是在windows下装的呀,有没有安装教程呀?
windows里装的,也可以在ubuntu下用,安装不麻烦,网上找一下吧
你好,我运行一下出现这样的错误,我也没找到问题所在,能给我指导一下么?
$ roslaunch smartcar_description smartcar_display.rviz.launch
… logging to /home/hello/.ros/log/6624798c-1f4e-11e7-a491-142d2744960f/roslaunch-hello-7860.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.
DEPRECATED IN HYDRO:
The tag should be prepended with ‘xacro’ if that is the intended use
of it, such as . Use the following script to fix incorrect
xacro includes:
sed -i ‘s/<include/<xacro:include/g' `find . -iname *.xacro`
DEPRECATED IN HYDRO:
The tag should be prepended with ‘xacro’ if that is the intended use
of it, such as . Use the following script to fix incorrect
xacro includes:
sed -i ‘s/<include/<xacro:include/g' `find . -iname *.xacro`
error loading tag:
file does not exist [/home/hello/catkin_ws/src/smartcar_description/config/smartcar_arbotix.yaml]
XML is
The traceback for the exception was written to the log file
你好,这篇博客是是在ROS fuerte版本上实现的,现在的ROS版本标签和命名有一些变化。另外smartcar_arbotix.yaml这个文件有么
你好,我现在也遇到这个问题了,怎么解决呢,从哪里能下载到这个文件呢?
参考:http://download.csdn.net/detail/darkmoonkiller/9662483
你好,我现在也遇到这个问题了,怎么解决呢,从哪里能下载到这个文件呢?
参考:http://download.csdn.net/detail/darkmoonkiller/9662483
你好,我在启动launch是出现错误,不知道怎么解决,能帮忙看一下么?
hello@h:~/catkin_ws/src$ roslaunch smartcar_description smartcar.urdf.xacro
… logging to /home/hello/.ros/log/2651efac-1ead-11e7-822b-142d2744960f/roslaunch-h-3781.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.
xacro: Traditional processing is deprecated. Switch to –inorder processing!
To check for compatibility of your document, use option –check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
No such file or directory: /home/hello/catkin_ws/src/smartcar_description/urdf/smartcar.urdf.xacro
XacroException('No such file or directory: /home/hello/catkin_ws/src/smartcar_description/urdf/smartcar.urdf.xacro',)
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/jade/share/xacro/xacro.py ‘/home/hello/catkin_ws/src/smartcar_description/urdf/smartcar.urdf.xacro’] returned with code [2].
Param xml is
The traceback for the exception was written to the log file
请教大神,请问您这个问题是怎么解决的,我也遇到了同样的问题。
文件路径和环境变量确定没问题么?
博主,您好!请问smartcar是如何订阅/cmd_vel话题并实现移动控制的?在仿真环境下,如何让自己搭建的机器人订阅指定的话题?谢谢!
这里arbotix会订阅/cmd_vel并驱动小车运动
理解了 😎 ,多谢博主!
博主好,运行roslaunch smartcar_description base.urdf.rviz.launch gui:=true后我遇到了如下问题:[display.rviz.launch] is neither a launch file in package [smartcar_description] nor is [smartcar_description] a launch file name
The traceback for the exception was written to the log file
我的是indigo版本。下载了http://download.csdn.net/detail/darkmoonkiller/9662483的之后该怎么用呢?
环境变量设置好了么,找不到功能包
请问你解决了这个bug吗?
针对最新版的indigo,按某人的要求,本课的课程代码如下
http://download.csdn.net/detail/darkmoonkiller/9662483
你好,我使用indigo,一直提示Could not find the ‘robot’ element in the xml file,请问是什么原因
参考一下:
http://answers.ros.org/question/12858/urdf-beginner-error/
http://answers.ros.org/question/188007/error-in-urdf/
http://answers.ros.org/question/68203/robot_state_publisher-can-find-robot-element/
hydrol版,需要把driver.py改成arbotix_driver,另外urdf.vcg需要替换成rviz文件,可以用其他成型机器人的轮式机器人的rviz配置文件直接替换,勉强能用。另外前几节有个svn checkout http://ros-by-example.googlecode.com/svn/trunk/rbx_vol_1 地址失效了,原版的移到哪了也没找到,新版的可以参考git clone https://github.com/pirobot/rbx1.git和rbx2.git
多谢!
hydrol版,需要把driver.py改成arbotix_driver,另外urdf.vcg需要替换成rviz文件,可以用其他成型机器人的轮式机器人的rviz配置文件直接替换,勉强能用。另外前几节有个svn checkout http://ros-by-example.googlecode.com/svn/trunk/rbx_vol_1 地址失效了,原版的移到哪了也没找到,新版的可以参考git clone https://github.com/pirobot/rbx1.git和rbx2.git
多谢!
DEPRECATED IN HYDRO:
The tag should be prepended with ‘xacro’ if that is the intended use
of it, such as . Use the following script to fix incorrect
xacro includes:
sed -i ‘s/<include/<xacro:include/g' `find . -iname *.xacro`
DEPRECATED IN HYDRO:
The tag should be prepended with ‘xacro’ if that is the intended use
of it, such as . Use the following script to fix incorrect
xacro includes:
sed -i ‘s/<include/<xacro:include/g' `find . -iname *.xacro`
error loading tag:
file does not exist [/home/exbot/che/src/smartcar_description/config/smartcar_arbotix.yaml]
XML is
The traceback for the exception was written to the log file
这是怎么个情况啊 😥 😥 😥
ROS版本的问题,把“include”那个地方改成“xacro:include”试一下
你好,我用的indigo,根据你的文章稍作了些修改,rviz正确显示了小车,但最后发布topic时候,小车不动,请问是什么原因啊?谢谢!
启动后的打印信息如下:
exbot@ubuntu:~/catkin_ws/src/smartcar_description$ roslaunch smartcar_description smartcar_display.rviz.launch
… logging to /home/exbot/.ros/log/51912d8a-44e8-11e6-8d54-000c29a778a5/roslaunch-ubuntu-8041.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.
started roslaunch server http://ubuntu:54813/
SUMMARY
========
CLEAR PARAMETERS
* /arbotix/
PARAMETERS
* /arbotix/baud: 115200
* /arbotix/controllers/base_controller/Kd: 12
* /arbotix/controllers/base_controller/Ki: 0
* /arbotix/controllers/base_controller/Ko: 50
* /arbotix/controllers/base_controller/Kp: 12
* /arbotix/controllers/base_controller/accel_limit: 1.0
* /arbotix/controllers/base_controller/base_frame_id: base_footprint
* /arbotix/controllers/base_controller/base_width: 0.26
* /arbotix/controllers/base_controller/ticks_meter: 4100
* /arbotix/controllers/base_controller/type: diff_controller
* /arbotix/port: /dev/ttyUSB0
* /arbotix/rate: 20
* /arbotix/read_rate: 20
* /arbotix/sim: True
* /arbotix/sync_read: True
* /arbotix/sync_write: True
* /arbotix/write_rate: 20
* /robot_description: <?xml version="1….
* /robot_state_publisher/publish_frequency: 20.0
* /rosdistro: indigo
* /rosversion: 1.11.20
* /use_gui: False
* /use_sim_time: False
NODES
/
arbotix (arbotix_python/arbotix_driver)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
odom_left_wheel_broadcaster (tf/static_transform_publisher)
odom_right_wheel_broadcaster (tf/static_transform_publisher)
robot_state_publisher (robot_state_publisher/state_publisher)
rviz (rviz/rviz)
auto-starting new master
process[master]: started with pid [8056]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 51912d8a-44e8-11e6-8d54-000c29a778a5
process[rosout-1]: started with pid [8069]
started core service [/rosout]
process[arbotix-2]: started with pid [8081]
process[joint_state_publisher-3]: started with pid [8089]
process[robot_state_publisher-4]: started with pid [8090]
process[odom_left_wheel_broadcaster-5]: started with pid [8091]
process[odom_right_wheel_broadcaster-6]: started with pid [8110]
process[rviz-7]: started with pid [8129]
[INFO] [WallTime: 1467967528.741809] ArbotiX being simulated.
[INFO] [WallTime: 1467967528.847522] Started DiffController (base_controller). Geometry: 0.26m wide, 4100.0 ticks/m.
搞了半天没搞定,网上查了一下,又加了个odometry_publisher看看能不能解决,结果在没有发布topic时候,小车就在转。。。
启动信息没有问题,看一下节点关系图,是不是有哪个地方没连接对
你好,我也是能显示小车,但是rostopic小车不动,怎么解决的?谢谢
你好,你是怎么修改代码的的,我修改代码,rviz一直显示不了小车,网上找了很多资料说是bug,我的版本也是indigo,如果有可能,可以把你的那个功能包或者那个urdf和launch文件发给我一份吗?我的邮箱是youandmefree@163.com
你好,我也是同样的问题,请问可以分享一下代码吗?谢谢!2550087706@qq.com
您好,古月。我是ROS 初学者,在写urdf文件和xacro文件里的代码时,所有代码都是敲进去的(去除复制粘贴的),这样效率真的很低。我想问一下有没有辅助写代码的工具,就像VS里写C代码时,写了几个关键字母,会提示剩余部分,这样方便编写。
你好,我一般用vim,可以根据之前的关键字自动匹配提示,装一个插件就可以,可能其他的IDE也有这个功能。
非常感谢,没想到还有插件可以用。我想问一下,您知不知道有关ROS 探讨交流的QQ群呢。
ExBot开源机器人社区 109434898
您好,我是一个新手,正在学习您的教程,想请教一下本章中“urdf文件重新整理编写成.xacro文件”,,这是怎么实现的。
你好,xacro也是一种urdf模型的文件,支持的功能更多。你可以参考链接:http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File
您好,我正在学习您的教程,收货颇丰,非常感谢!但是有个问题想请教您,您在launch文件中启动了joint_state_publisher节点,不启动此节点,urdf模型无法在Rviz中显示,但是在《ROS BY Example 1》书当中并没有启动那个节点,但是模型依旧能够在Rviz中显示,这是为什么?谢谢
没有joint_state_publisher应该也是可以显示的,这个例程比较久了,有时间我需要运行一下看看。
好的,谢谢!