Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
robotics_ss25
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
olhas98
robotics_ss25
Commits
fad33d96
Commit
fad33d96
authored
1 month ago
by
eber03
Browse files
Options
Downloads
Patches
Plain Diff
Minor fixes in speed_calibration
parent
fb427b97
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/wheel_speed_calibration/wheel_speed_calibration/speed_calibration.py
+8
-3
8 additions, 3 deletions
..._calibration/wheel_speed_calibration/speed_calibration.py
with
8 additions
and
3 deletions
src/wheel_speed_calibration/wheel_speed_calibration/speed_calibration.py
+
8
−
3
View file @
fad33d96
...
@@ -49,10 +49,12 @@ class SpeedCalibrator(Node):
...
@@ -49,10 +49,12 @@ class SpeedCalibrator(Node):
self
.
active
=
False
self
.
active
=
False
speed_cmd
=
SpeedCommand
()
speed_cmd
=
SpeedCommand
()
speed_cmd
.
value
=
0.0
speed_cmd
.
value
=
0.0
speed_cmd
.
header
.
stamp
=
self
.
get_clock
().
now
().
to_msg
()
self
.
speed_pub
.
publish
(
speed_cmd
)
self
.
speed_pub
.
publish
(
speed_cmd
)
steering_cmd
=
NormalizedSteeringCommand
()
steering_cmd
=
NormalizedSteeringCommand
()
steering_cmd
.
value
=
0.0
steering_cmd
.
value
=
0.0
steering_cmd
.
header
.
stamp
=
self
.
get_clock
().
now
().
to_msg
()
self
.
steering_pub
.
publish
(
steering_cmd
)
self
.
steering_pub
.
publish
(
steering_cmd
)
self
.
get_logger
().
info
(
f
"
Driving
{
self
.
distance
}
m completed!
"
)
self
.
get_logger
().
info
(
f
"
Driving
{
self
.
distance
}
m completed!
"
)
...
@@ -65,20 +67,23 @@ class SpeedCalibrator(Node):
...
@@ -65,20 +67,23 @@ class SpeedCalibrator(Node):
# publish speed and steering
# publish speed and steering
def
drive
(
self
):
def
drive
(
self
):
if
not
self
.
active
and
self
.
meters_per_tick
is
None
:
if
self
.
meters_per_tick
is
None
:
if
not
self
.
active
:
self
.
get_logger
().
info
(
f
'
Starting drive with steering:
{
self
.
steering
}
'
)
self
.
active
=
True
self
.
active
=
True
# parse and send steering command
# parse and send steering command
steering_cmd
=
NormalizedSteeringCommand
()
steering_cmd
=
NormalizedSteeringCommand
()
steering_cmd
.
value
=
self
.
steering
steering_cmd
.
value
=
self
.
steering
steering_cmd
.
header
.
stamp
=
self
.
get_clock
().
now
().
to_msg
()
self
.
steering_pub
.
publish
(
steering_cmd
)
self
.
steering_pub
.
publish
(
steering_cmd
)
# parse and send speed command
# parse and send speed command
speed_cmd
=
SpeedCommand
()
speed_cmd
=
SpeedCommand
()
speed_cmd
.
value
=
self
.
speed
speed_cmd
.
value
=
self
.
speed
speed_cmd
.
header
.
stamp
=
self
.
get_clock
().
now
().
to_msg
()
self
.
speed_pub
.
publish
(
speed_cmd
)
self
.
speed_pub
.
publish
(
speed_cmd
)
self
.
get_logger
().
info
(
f
'
Starting drive with steering:
{
self
.
steering
}
'
)
def
main
(
args
=
None
):
def
main
(
args
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment