Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Robobin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plw1g21
Robobin
Commits
c03b0f50
Commit
c03b0f50
authored
7 months ago
by
Paul-Winpenny
Browse files
Options
Downloads
Patches
Plain Diff
Reverting a few changes back.
parent
7d98c8e2
No related branches found
No related tags found
1 merge request
!2
Manual control user interface
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ros2/src/robobin/robobin/api_node.py
+0
-1
0 additions, 1 deletion
ros2/src/robobin/robobin/api_node.py
ros2/src/robobin/robobin/motor_control_node.py
+2
-5
2 additions, 5 deletions
ros2/src/robobin/robobin/motor_control_node.py
with
2 additions
and
6 deletions
ros2/src/robobin/robobin/api_node.py
+
0
−
1
View file @
c03b0f50
...
@@ -53,7 +53,6 @@ class ApiNode(Node):
...
@@ -53,7 +53,6 @@ class ApiNode(Node):
publisher
=
self
.
publisher_topics
[
topic
]
publisher
=
self
.
publisher_topics
[
topic
]
# Check if the topic is 'cmd_vel' and format the message as a Twist message
# Check if the topic is 'cmd_vel' and format the message as a Twist message
self
.
get_logger
().
info
(
f
"
Publishing to
{
topic
}
:
{
message
}
"
)
if
topic
==
"
cmd_vel
"
and
isinstance
(
message
,
tuple
):
if
topic
==
"
cmd_vel
"
and
isinstance
(
message
,
tuple
):
linear_x
,
angular_z
=
message
linear_x
,
angular_z
=
message
twist_msg
=
Twist
()
twist_msg
=
Twist
()
...
...
This diff is collapsed.
Click to expand it.
ros2/src/robobin/robobin/motor_control_node.py
+
2
−
5
View file @
c03b0f50
...
@@ -10,8 +10,7 @@ class MotorController(Node):
...
@@ -10,8 +10,7 @@ class MotorController(Node):
self
.
wheel_radius
=
0.05
# meters
self
.
wheel_radius
=
0.05
# meters
self
.
wheel_base
=
0.30
self
.
wheel_base
=
0.30
self
.
get_logger
().
info
(
"
hello
"
)
self
.
get_logger
().
info
(
"
hello
"
)
left_pwm
=
0
right_pwm
=
0
def
cmd_vel_callback
(
self
,
msg
):
def
cmd_vel_callback
(
self
,
msg
):
v
=
msg
.
linear
.
x
v
=
msg
.
linear
.
x
...
@@ -47,9 +46,7 @@ class MotorController(Node):
...
@@ -47,9 +46,7 @@ class MotorController(Node):
elif
v
==
-
0.5
:
elif
v
==
-
0.5
:
left_pwm
=
-
75
left_pwm
=
-
75
right_pwm
=
-
75
right_pwm
=
-
75
if
v
==
0
:
left_pwm
=
0
right_pwm
=
0
self
.
get_logger
().
info
(
f
"
Left PWM:
{
left_pwm
}
, Right PWM:
{
right_pwm
}
"
)
self
.
get_logger
().
info
(
f
"
Left PWM:
{
left_pwm
}
, Right PWM:
{
right_pwm
}
"
)
...
...
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