Skip to content

Commit

Permalink
Refactor navsat_gpxfix demo (#642)
Browse files Browse the repository at this point in the history
* Refactor navsat_gpxfix demo

Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero authored Dec 13, 2024
1 parent 8bfdad1 commit 4b57d24
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 63 deletions.
5 changes: 5 additions & 0 deletions ros_gz_sim_demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ Publishes magnetic field readings.

Publishes satellite navigation readings, only available in Fortress on.

GNSS information can be obtained as:

# sensor_msgs/msg/NavSatFix
ros2 launch ros_gz_sim_demos navsat.launch.xml
# gps_msgs/msg/GPSFix
ros2 launch ros_gz_sim_demos navsat_gpsfix.launch.xml

![](images/navsat_demo.png)

Expand Down
6 changes: 6 additions & 0 deletions ros_gz_sim_demos/config/navsat_gpsfix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Navsat_gpsfix configuration.
- topic_name: "/navsat"
ros_type_name: "gps_msgs/msg/GPSFix"
gz_type_name: "gz.msgs.NavSat"
lazy: true
direction: GZ_TO_ROS
63 changes: 0 additions & 63 deletions ros_gz_sim_demos/launch/navsat_gpsfix.launch.py

This file was deleted.

12 changes: 12 additions & 0 deletions ros_gz_sim_demos/launch/navsat_gpsfix.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<launch>
<gz_server
world_sdf_file="spherical_coordinates.sdf"
use_composition="True"
create_own_container="True" />
<ros_gz_bridge
bridge_name="ros_gz_bridge"
config_file="$(find-pkg-share ros_gz_sim_demos)/config/navsat_gpsfix.yaml"
use_composition="True" />
<node pkg="rqt_topic" exec="rqt_topic" args="-t" />
<executable cmd="gz sim -g" />
</launch>

0 comments on commit 4b57d24

Please sign in to comment.