Skip to content

Conversation

@DeclanMcIntaggart
Copy link

Remade the config files for the gps to factory reset before and changed the frequency of gps/fix and the heading

Copy link
Member

@ConnorNeed ConnorNeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some things to get started with.

I will challenge you to see if you can create a helper python library that contains all the shared helper functions reducing code dupliations.

Given that the configuration scripts are going to be used as command line tools, use argparse (https://docs.python.org/3/library/argparse.html) to allow us to change some of the parameters from the command line. Make sure to use whatever the "Correct" versions for our setup as the defaults.

self.get_parameter("Baudrate").get_parameter_value().integer_value
)
self.declare_parameter("Device", "/dev/ttyACM0")
self.declare_parameter(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the default path. It can be overwriten in the launch file. Using /dev/ttyACM0 makes sense as a default.

"""

print("\nFormatting RTCM MSGOUT CFG-VALSET message...")
layers = 7 # 1 = RAM, 2 = BBR, 4 = Flash (can be OR'd)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create some named constants to remove this magic number

"/dev/ttyACM0",
38400,
) as stream:
layers = 7 # RAM + BBR + Flash for persistent storage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same concern as above

layers = 7 # RAM + BBR + Flash for persistent storage
transaction = 0
cfg_data = [
("CFG_MSGOUT_UBX_NAV_RELPOSNED_USB", 1), # 1 = 1 time per epoch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the conversion from epoch to hz?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is 1/rate_ms, where the rate should be in seconds and NAV_RATE_MS, so a value of NAV_RATE_MS is 200 is equal to 5 hz

@ConnorNeed ConnorNeed mentioned this pull request Nov 21, 2025
@ConnorNeed
Copy link
Member

Before you start worring about the new task of reading the base station via a different interface this needs to get cleaned up and merged in.

Copy link
Member

@ConnorNeed ConnorNeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better. Good work

{
"Device": "/dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_D30I1LY5-if00-port0"
},
# expose launch arg to node; node can act on it to load config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was obviously AI but please double check the work. This doesn't make any sense in the context of the PR. The part right below it runs the config. Why are we passing it into the node?

output="both",
remappings=ublox_remappings,
parameters=[params_file],
parameters=[params_file, {"load_config": load_config}],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue

)

return launch.LaunchDescription([ublox_gps_node, heading_cmd])
return launch.LaunchDescription(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is some of this declared above and some of this in the return statement? Either style is fine but please pick one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants