Skip to content

ChesterMK7/py_get_init_pos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py_get_init_pos

Modified version of the ROS2 Python Basic Subscriber Example combined with the geonav_conversions.py file from geonav_transform. Converts GPS coordinates from a NavSatFix message topic into the local XYZ coordinate system used by Rviz2 to obtain the initial position of the sensor on the local grid. Writes the XYZ coordinates to the initial_state parameter of a user-specified robot_localization params yaml file.

Requirements

Ubuntu & ROS2
GPS Data published as a NavSatFix ROS2 topic

Tested Using

Ubuntu 22.04 ARM64
ROS2 Humble
Nvidia Jetson AGX Orin
Inertial Sense uINS
ISRoverNetworkNMEA is_gps_publisher_ros2

Setup

Create a ROS2 Workspace

mkdir -p gpsWS/src
cd gpsWS/src

Clone the respository in the src folder

git clone https://github.com/ChesterMK7/py_get_init_pos

Make sure to configure the files you want to use

nano py_get_init_pos/py_get_init_pos/subscriber_member_function.py

Specifically modify these lines in subscriber_member_function.py

# Filenames for param input and output
input_file = "/home/orin/Desktop/launch_files/nav2_gps/scout/params/scout_dual_ekf_navsat_params.backup.yaml"
# Note that the output file WILL BE OVERWRITTEN when the node runs
output_file = "/home/orin/Desktop/launch_files/nav2_gps/scout/params/scout_dual_ekf_navsat_params.yaml"

Return to the workspace directory and build using colcon

cd ..
source /opt/ros/<ros2-version>/setup.bash
colcon build

Source the workspace

source install/setup.bash

Usage

Run the parser/publisher node

ros2 run py_get_init_pos gps_convert

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages