Hello all,
I have two ublox GPS modules and I want to connect and record data from both of them simultaneously into a rosbag. I followed this suggestion and created a launch file as given below. It creates two different nodes gps1 and gps2. But topics are only published in one of them. What could be the error? I highly appreciate any suggestions.
<launch>
<arg name="output" default="screen" />
<arg name="respawn" default="true" />
<arg name="respawn_delay" default="30" />
<arg name="clear_params" default="true" />
<node pkg="ublox_gps" type="ublox_gps" name="gps1"
output="$(arg output)"
clear_params="$(arg clear_params)"
respawn="$(arg respawn)"
respawn_delay="$(arg respawn_delay)">
<rosparam command="load"
file="$(find ublox_gps)/config/gps1.yaml" />
</node>
<node pkg="ublox_gps" type="ublox_gps" name="gps2"
output="$(arg output)"
clear_params="$(arg clear_params)"
respawn="$(arg respawn)"
respawn_delay="$(arg respawn_delay)">
<rosparam command="load"
file="$(find ublox_gps)/config/gps2.yaml" />
</node>
</launch>
Thank you
Edit:
Roslaunch output
SUMMARY
========
CLEAR PARAMETERS
* /gps1/
* /gps2/
PARAMETERS
* /gps1/dat/set: False
* /gps1/device: /dev/ttyACM0
* /gps1/dr_limit: 0
* /gps1/dynamic_model: portable
* /gps1/enable_ppp: False
* /gps1/fix_mode: auto
* /gps1/frame_id: gps
* /gps1/gnss/beidou: False
* /gps1/gnss/glonass: True
* /gps1/gnss/gps: True
* /gps1/gnss/qzss: False
* /gps1/gnss/sbas: False
* /gps1/inf/all: True
* /gps1/nav_rate: 4
* /gps1/rate: 4
* /gps1/rtcm/ids: [5, 87, 77, 230]
* /gps1/rtcm/rates: [1, 1, 1, 10]
* /gps1/subscribe/aid/all: False
* /gps1/subscribe/all: True
* /gps1/uart1/baudrate: 19200
* /gps1/uart1/in: 1
* /gps1/uart1/out: 4
* /gps2/dat/set: False
* /gps2/device: /dev/ttyACM1
* /gps2/dr_limit: 0
* /gps2/dynamic_model: portable
* /gps2/enable_ppp: False
* /gps2/fix_mode: auto
* /gps2/frame_id: gps
* /gps2/gnss/beidou: False
* /gps2/gnss/glonass: True
* /gps2/gnss/gps: True
* /gps2/gnss/qzss: False
* /gps2/gnss/sbas: False
* /gps2/inf/all: True
* /gps2/nav_rate: 4
* /gps2/rate: 4
* /gps2/rtcm/ids: [5, 87, 77, 230]
* /gps2/rtcm/rates: [1, 1, 1, 10]
* /gps2/subscribe/aid/all: False
* /gps2/subscribe/all: True
* /gps2/uart1/baudrate: 19200
* /gps2/uart1/in: 1
* /gps2/uart1/out: 4
* /rosdistro: kinetic
* /rosversion: 1.12.14
NODES
/
gps1 (ublox_gps/ublox_gps)
gps2 (ublox_gps/ublox_gps)
auto-starting new master
process[master]: started with pid [5360]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 2459bdc2-f86a-11e8-b9a4-b0359fa7b741
process[rosout-1]: started with pid [5373]
started core service [/rosout]
process[gps1-2]: started with pid [5392]
process[gps2-3]: started with pid [5393]
[ INFO] [1543999540.325794872]: U-Blox: Opened serial port /dev/ttyACM0
[ INFO] [1543999540.325917297]: U-Blox: Opened serial port /dev/ttyACM1
[DEBUG] [1543999540.326219977]: Configuring UART1 baud rate: 19200, In/Out Protocol: 1 / 4
[DEBUG] [1543999540.326422337]: Configuring UART1 baud rate: 19200, In/Out Protocol: 1 / 4
[DEBUG] [1543999540.328171094]: 2.30 (86283), HW VER: 00080000
[DEBUG] [1543999540.328246885]: 2.01 (75331)
[DEBUG] [1543999540.328287796]: PROTVER 17.00
[DEBUG] [1543999540.328329066]: FIS 0xEF4015 (79189)
[DEBUG] [1543999540.328386815]: MOD NEO-M8T-0
[DEBUG] [1543999540.328463317]: TIM RAW 1.01
[DEBUG] [1543999540.328537323]: GPS;SBAS;GLO;BDS;IMES;QZSS
[ INFO] [1543999540.328615602]: U-Blox Firmware Version: 8
[DEBUG] [1543999540.329056341]: 2.30 (86283), HW VER: 00080000
[DEBUG] [1543999540.329139780]: 2.01 (75331)
[DEBUG] [1543999540.329186089]: PROTVER 17.00
[DEBUG] [1543999540.329237753]: FIS 0xEF4015 (79189)
[DEBUG] [1543999540.329286315]: MOD NEO-M8T-0
[DEBUG] [1543999540.329327041]: TIM RAW 1.01
[DEBUG] [1543999540.329364977]: GPS;SBAS;GLO;BDS;IMES;QZSS
[ INFO] [1543999540.329433662]: U-Blox Firmware Version: 8
[DEBUG] [1543999540.391399502]: Configuring measurement rate to 250 and nav rate to 4
[DEBUG] [1543999540.392052605]: Configuring SBAS: usage 0, max_sbas 0
[DEBUG] [1543999540.392678146]: Disabling PPP
[DEBUG] [1543999540.393197616]: Setting dynamic model to 0
[DEBUG] [1543999540.393761297]: Setting fix mode to 3
[DEBUG] [1543999540.394273739]: Setting DR Limit to 0
[DEBUG] [1543999540.395159373]: Read GNSS config.
[DEBUG] [1543999540.395204376]: Num. tracking channels in hardware: 32
[DEBUG] [1543999540.395245356]: Num. tracking channels to use: 32
[DEBUG] [1543999540.395288746]: U-Blox GNSS configuration is correct. GNSS not re-configured.
[ INFO] [1543999540.395332338]: U-Blox configured successfully.
[DEBUG] [1543999540.395378162]: Subscribing to U-Blox messages
[DEBUG] [1543999540.395530543]: Configuring measurement rate to 250 and nav rate to 4
[DEBUG] [1543999540.396215367]: Configuring SBAS: usage 0, max_sbas 0
[DEBUG] [1543999540.396896163]: Disabling PPP
[DEBUG] [1543999540.397478570]: Setting dynamic model to 0
[DEBUG] [1543999540.398291347]: Setting fix mode to 3
[DEBUG] [1543999540.398992193]: Setting DR Limit to 0
[DEBUG] [1543999540.399972056]: Read GNSS config.
[DEBUG] [1543999540.400041409]: Num. tracking channels in hardware: 32
[DEBUG] [1543999540.400096868]: Num. tracking channels to use: 32
[DEBUG] [1543999540.400148743]: U-Blox GNSS configuration is correct. GNSS not re-configured.
[ INFO] [1543999540.400197079]: U-Blox configured successfully.
[DEBUG] [1543999540.400250121]: Subscribing to U-Blox messages
[DEBUG] [1543999540.448697204]: Configuring INF messages
[DEBUG] [1543999540.456096276]: Configuring INF messages
[ INFO] [1543999541.295832536]: INF: u-blox AG - www.u-blox.com
[ INFO] [1543999541.295943535]: INF: HW UBX-M80xx 00080000
[ INFO] [1543999541.296179711]: INF: EXT CORE 2.30 (86283) Oct 20 2014 13:51:49
[ INFO] [1543999541.296755588]: INF: ROM BASE 2.01 (75331) Oct 29 2013 13:28:17
[ INFO] [1543999541.296844889]: INF: MOD NEO-M8T-0
[ INFO] [1543999541.296978439]: INF: PROTVER 17.00
[ INFO] [1543999541.297351166]: INF: GNSS OTP: GPS GLO, SEL: GPS GLO
[ INFO] [1543999541.297691800]: INF: TIM RAW 1.01
[ INFO] [1543999541.297798813]: INF: ANTSUPERV=AC SD PDoS SR
[ INFO] [1543999541.298059219]: INF: ANTSTATUS=OK
[ INFO] [1543999541.298293001]: INF: FIS 0xEF4015 (79189) found
[ INFO] [1543999541.299720163]: INF: LLC FFFFFFFF-FFFFFFED-FFFFFFFF-FFFFFFAE-FFFFFF69
Topics and nodes:
Latitude-5480:~$ rosnode list
/gps1
/gps2
/rosout
Latitude-5480:~$ rostopic list
/diagnostics
/gps2/fix
/gps2/fix_velocity
/rosout
/rosout_agg
Originally posted by abkrishna on ROS Answers with karma: 16 on 2018-12-04
Post score: 0
Original comments
Comment by Hamid Didari on 2018-12-05:
could you share the output of launch file?
Comment by abkrishna on 2018-12-05:
Edited the question with asked details.
Comment by PeteBlackerThe3rd on 2018-12-05:
This shouldn't be necessary but do you want to try remapping the fix topic from one of the nodes to a different name. Just to see if that makes any difference.
Comment by abkrishna on 2018-12-05:
@PeteBlackerThe3rd, I tried,
<remap from="/gps1/fix" to="/fix"/>
<remap from="/gps1/fix_velocity" to="/fix_velocity"/>
but no change in rostopic list.
Comment by PeteBlackerThe3rd on 2018-12-05:
Rather non-intuitively the topic names need to be the other way around in remap.
<remap from="/fix" to="/gps1/fix" />
<remap from="/fix_velocity" to="/pgs1/fix_velocity" />
Give this a try.