最近在学习机器人关节控制,想要尝试一下baxter,按照:
https://www.freesion.com/article/34231292646/
进行了编译安装。
问题一
1.问题
在运行下面代码时,
roslaunch baxter_gazebo baxter_world.launch
出现了如下报错:
GazeboRosControlPlugin missing while using DefaultRobotHWSim, defaults to true.
This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead.
If you do not want to fix this issue in an old package just set to true.
2.原因分析
因为包的版本不对应造成的:
GazeboRosControlPlugin missing使用DefaultRobotHWSim时,默认为true。
此设置假定您有一个包含DefaultRobotHWSim的旧实现的旧包,其中忽略robotNamespace,而是使用绝对路径。
如果不想在旧包中修复此问题,只需将设置为true。
3.解决方法
参考链接: link.
1.在baxter_ws文件下找到所有包含“ros_control_plugin"的文件
grep -rl "ros_control plugin" ./
我的是:
./src/baxter_common/baxter_description/urdf/baxter.urdf
./src/baxter_common/baxter_description/urdf/baxter_base/baxter_base.gazebo.xacro
./install/share/baxter_description/urdf/baxter.urdf
./install/share/baxter_description/urdf/baxter_base/baxter_base.gazebo.xacro
2.将其中四个文件中ros_control_plugin下的增加<legacyModeNS>true</legacyModeNS>
如:
<gazebo>
<plugin name="baxter_ros_control" filename="libbaxter_gazebo_ros_control.so">
<robotNamespace>/robot</robotNamespace>
<legacyModeNS>true</legacyModeNS>
</plugin>
</gazebo>
问题二
1.问题
在运行下面代码时,
roslaunch baxter_gazebo baxter_world.launch
出现了如下报错:
DeserializationError cannot deserialize: unknown error handler name 'rosmsg’
2.原因
参考链接: link.
The problem is that you are mixing older and newer Debian packages. you don’t have the latest version of genpy yet.
dpkg -l | grep genpy shows version 0.6.7. But the newly installed version of ros-kinetic-rosbridge-suite was generated with the latest version of genpy and therefore expect it to be available.
简单的说,ros中的一些pkg的依赖pkg没有相对应的更新(虽然有但版本旧)
3.解决方法
sudo apt-get install ros-kinetic-genpy