Issue with multiple instances of ublox_gps nodes
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 ...
could you share the output of launch file?
Edited the question with asked details.
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.
@PeteBlackerThe3rd, I tried,
but no change in rostopic list.
Rather non-intuitively the topic names need to be the other way around in remap.
Give this a try.