Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
RSDK-2252 - Unable to run cartogropher through RDK (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkufieta authored Mar 9, 2023
1 parent 989bc54 commit de56e24
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ func (config *AttrConfig) SetOptionalParameters(defaultPort string, defaultDataR
return nil
}

// SetOptionalParametersReplacement updates any unset optional config parameters to the values passed to this function.
func SetOptionalParametersReplacement(config *AttrConfig, defaultPort string,
// GetOptionalParameters sets any unset optional config parameters to the values passed to this function,
// and returns them.
func GetOptionalParameters(config *AttrConfig, defaultPort string,
defaultDataRateMsec, defaultMapRateSec int, logger golog.Logger,
) (string, int, int, bool, bool, error) {
port := config.Port
Expand All @@ -146,10 +147,12 @@ func SetOptionalParametersReplacement(config *AttrConfig, defaultPort string,
logger.Debugf("no data_rate_msec given, setting to default value of %d", defaultDataRateMsec)
}

mapRateSec := *config.MapRateSec
mapRateSec := 0
if config.MapRateSec == nil {
logger.Debugf("no map_rate_sec given, setting to default value of %d", defaultMapRateSec)
mapRateSec = defaultMapRateSec
} else {
mapRateSec = *config.MapRateSec
}
if mapRateSec == 0 {
logger.Info("setting slam system to localization mode")
Expand Down

0 comments on commit de56e24

Please sign in to comment.