开发ROS,先打开终端运行:$roscore
$roslaunch catvehicle catvehicle_follower.launch
[ERROR] [WallTime: 1503978445.501898] [0.000000] bad callback:
Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 720, in _invoke_callback
cb(msg)
File "/home/fhp/catvehicle_ws/src/catvehicle/src/cmdvel2gazebo.py", line 90, in callback
self.z = max(-self.maxsteer,min(self.maxsteer,data.angular.z))
AttributeError: cmdvel2gazebo instance has no attribute 'maxsteer'
解决:
cd ~/catvehicle_ws
source devel/setup.bash
export SVGA_VGPU10=0
roslaunch catvehicle catvehicle_follower.launch
$ roslaunch catvehicle hectorslam.launch
[ERROR] [1503974373.815068332, 1899.686000000]: Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the past. Requested time 1899.166000000 but the earliest data is at time 1899.306000000, when looking up transform from frame [catvehicle/base_link] to frame [catvehicle/odom]
解决:
https://answers.ros.org/question/164911/move_base-and-extrapolation-errors-into-the-future/
$gzclient
Error [ModelDatabase.cc:383] Unable to parse model.config for model[http://gazebosim.org/models/calibration_plane]
Error [ModelDatabase.cc:383] Unable to parse model.config for model[http://gazebosim.org/models/checkerboard_plane]
解决:http://answers.gazebosim.org/question/1509/how-to-solve-these-errors-modeldatabasecc290/
https://bitbucket.org/osrf/gazebo_models/pull-requests/263/unable-to-parse-modelconfig/diff#comment-None
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 154 (DRI2)
Minor opcode of failed request: 3 (DRI2CreateDrawable)
Resource id in failed request: 0x4400002
Serial number of failed request: 29
Current serial number in output stream: 30
解决:再次打开gazebo
$roslaunch catvehicle catvehicle_neighborhood.launch
[gazroslaunch catvehicle catvehicle_neighborhood.launchebo-roslaunch catvehicle catvehicle_neighborhood.launch2] process has died [pid 70182, exit code 134, cmd /opt/ros/indigo/lib/gazebo_ros/gzserver -e ode /home/fhp/catvehicle_ws/src/catvehicle/worlds/neighborhood.world __name:=gazebo __log:=/home/fhp/.ros/log/b2274a4a-8c99-11e7-9967-000c29e8ca7d/gazebo-2.log].
log file: /home/fhp/.ros/log/b2274a4a-8c99-11e7-9967-000c29e8ca7d/gazebo-2*.log
解决:重新安装ROS环境
$rosrun rviz rviz
[ERROR] [1503999618.128766367, 40.336000000]: Tried to advertise a service that is already advertised in this node [/rviz_1503999603320481670/compressed/set_parameters]
$roslaunch catvehicle joystick.launch
[ERROR] [1504082464.785372304]: Couldn't open joystick /dev/input/js0. Will retry everysecond.
解决: sudo chmod +777 /dev/input/js0