Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Trajektorien des menschlichen Aufstehens für die Entwicklung eines kooperativen Assistenzsystems
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ventsislav Dokusanski
Trajektorien des menschlichen Aufstehens für die Entwicklung eines kooperativen Assistenzsystems
Commits
98ca4b38
Commit
98ca4b38
authored
10 months ago
by
uquzq
Browse files
Options
Downloads
Patches
Plain Diff
Fix RViz visualization bug in 'forward_kinematics_2dof_2' node
parent
ddc60697
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ros2_ws/src/simple_robot_2dof/simple_robot_2dof/forward_kinematics_node_2dof_2.py
+6
-6
6 additions, 6 deletions
..._2dof/simple_robot_2dof/forward_kinematics_node_2dof_2.py
with
6 additions
and
6 deletions
ros2_ws/src/simple_robot_2dof/simple_robot_2dof/forward_kinematics_node_2dof_2.py
+
6
−
6
View file @
98ca4b38
...
...
@@ -76,7 +76,7 @@ class Forward_Kinematics_Node_2Dof(Node):
self
.
construct_path
(
rotated_intermediate_vector
)
def
translation
(
self
):
# defin
t
e the desired height
# define the desired height
h
=
1
# split h
h_fraction
=
self
.
phi
*
h
...
...
@@ -95,18 +95,18 @@ class Forward_Kinematics_Node_2Dof(Node):
# construct the path of the translation
self
.
construct_path
(
translated_vector
)
def
construct_path
(
self
,
vector
_path
):
def
construct_path
(
self
,
vector
):
# RViz
pose
=
PoseStamped
()
pose
.
header
.
frame_id
=
"
map
"
pose
.
header
.
stamp
=
self
.
get_clock
().
now
().
to_msg
()
pose
.
pose
.
position
.
x
=
vector
_path
[
0
]
pose
.
pose
.
position
.
y
=
vector
_path
[
1
]
pose
.
pose
.
position
.
z
=
vector
_path
[
2
]
pose
.
pose
.
position
.
x
=
vector
[
0
]
pose
.
pose
.
position
.
y
=
vector
[
1
]
pose
.
pose
.
position
.
z
=
vector
[
2
]
pose
.
pose
.
orientation
.
w
=
1.0
#If the path is completed clear it
if
self
.
phi
==
0
:
if
(
self
.
phi
==
0
and
self
.
index
%
2
==
0
)
:
self
.
path
.
poses
.
clear
()
else
:
self
.
path
.
poses
.
append
(
pose
)
...
...
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