LoginSignup
2
2

More than 1 year has passed since last update.

RTK-gnss(GPS)をROS2に入れ込む(備忘録)

Last updated at Posted at 2022-06-15

備忘録

おおまかな構成

f9p
ubuntu
ros2 galactic

参考

git clone

cd
cd ros2/src

(自分のwsはros2)

git clone -b galactic-devel https://github.com/KumarRobotics/ublox.git

-b以降のブランチは自分の環境に合わせて設定(自分はROS2 galactic)
ブランチ一覧の見方:https://qiita.com/sunstripe2011/items/30f46a7bf451c1a85c2b
ブランチ指定:https://backlog.com/ja/git-tutorial/stepup/08/

ビルド

ros2のワークスペース(ws)にディレクトリを変更(自分のwsはros2)

cd
cd ros2

ビルド

colcon build 

設定変更

①/ros2/ublox/ublox_gps/config/zed_f9p.yamlの中身の該当行のみ下記に変更

debug :4
device : /dev/ttyACM0

deviceは実際のデバイスに合わせる
(参考):https://qiita.com/m2_labo/items/7823fb26197fa5f5ff23

②/ros2/ublox/ublox_gps/launch/ublox_gps_node-launch.pyの中身の該当行のみ下記に変更

params = os.path.join(config_directory, 'zed_f9p.yaml')

再度ビルド

cd
cd ros2
colcon build
source install/setup.bash

実行

ubloxのGPSノード起動

ros2 launch ublox_gps ublox_gps_node-launch.py

別ターミナルでrtk起動

cd RTKLIB/app/consapp/str2str/gcc
./str2str -in ntrip://アイディ:パスワード@ユーアールエル:ポート/マウント#rtcm3 -out serial://ttyACM0:115200#1111

ttyACM0のシリアルポートは自分の接続したシリアルポートに合わせてください。
起動しない場合はrtklibの実装してください
参考:https://qiita.com/m2_labo/items/4af7a5da91addeb93a15

確認

ros2 topic echo /fix

教えてほしい
別途navsat_transform_nodeをたちあげてもsensor_msgs/NavSatFix message on the /gps/filtered がpublishされない。設定等ご存じのかた教えて頂きたい。

解決できた↓↓

https://qiita.com/m2_labo/items/201836440cd846e754fa
https://qiita.com/m2_labo/items/6eab3202289220aadd5f

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2