Controller for a steer drive mobile base.
-
Subscribe
steer_drive_controller/cmd_vel
にTwist型のメッセージを投げて下さい.
-
Publish
steer_drive_controller/odom
を出すべきなのですが,未完成です.
-
例:SteerDriveController + SteerBot(RobotHWSim) で起動して,以下のメッセージで動く
rostopic pub -1 steer_drive_controller/cmd_vel geometry_msgs/Twist -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 0.5]'
- base_link
- steer
- left_front_wheel
- left_rear_wheel
- right_front_wheel
- right_rear_wheel
- camera_link
- front_bottom_lrf
- front_top_lrf
- rear_bottom_lrf
- base_to_left_front_wheel
- base_to_left_rear_wheel
- base_to_right_front_wheel
- base_to_right_rear_wheel
- base_to_steer
- base_to_steer_right: gazebo用のvirtual.
- base_to_steer_left: gazebo用のvirtual.
- パスを通す
source path.bash
- gazeboを実行する
roslaunch third_robot_gazebo third_robot_world.launch
- コントローラ動作用の最低限の設定を行うlaunchファイルを実行する
roslaunch steer_drive_controller steer_drive_test_setting.launch
- パスを通したコンソールでQtCreatorを起動する
qtcreator
-
QtCreatorでROSのパッケージをビルド&デバッグ実行するにしたがってビルドする.実行オプションで
steer_drive_test
を選択する. -
third_robot_control/steer_drive_controller/include/steer_drive_controller.h
内で#define GUI_DEBUG
をアンコメントアウトする. -
53行目:
#define GUI_DEBUG // uncommentout when you use qtcreator for debugging
ってとこ. -
デバッグ用のモジュールに名前空間がついてないので,無理やり付与する設定.
-
third_robot_control/steer_drive_controller/test/steer_drive_test.cpp
のmain関数内でブレイクポイントを置いてデバッグ実行.- SteerRobotはフェイクで作ってある.
bool rt_code = rb_controller.init(steer_drive_bot, nh_main, nh_control);
でコントローラの初期化