Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
franka_description
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Nikhil Ambardar
franka_description
Commits
a9ba490a
Commit
a9ba490a
authored
5 years ago
by
Christoph Jähne
Browse files
Options
Downloads
Patches
Plain Diff
improved prints in resource_helpers
parent
4998ee71
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
franka_hw/src/resource_helpers.cpp
+14
-11
14 additions, 11 deletions
franka_hw/src/resource_helpers.cpp
with
14 additions
and
11 deletions
franka_hw/src/resource_helpers.cpp
+
14
−
11
View file @
a9ba490a
...
...
@@ -46,9 +46,8 @@ bool getArmClaimedMap(ResourceWithClaimsMap& resource_map, ArmClaimedMap& arm_cl
// 7 non-torque claims on joint_level or one claim on cartesian level.
for
(
auto
map_it
=
resource_map
.
begin
();
map_it
!=
resource_map
.
end
();
map_it
++
)
{
if
(
!
findArmIdInResourceId
(
map_it
->
first
,
&
current_arm_id
))
{
ROS_ERROR_STREAM
(
"Could not find arm_id in resource "
<<
map_it
->
first
<<
". Conflict! Name joints as '<robot_arm_id>_joint<jointnumber>'"
);
ROS_ERROR_STREAM
(
"Resource conflict: Could not find arm_id in resource "
<<
map_it
->
first
<<
". Name joints as '<robot_arm_id>_joint<jointnumber>'"
);
return
false
;
}
ResourceClaims
new_claim
;
...
...
@@ -139,8 +138,9 @@ ControlMode getControlMode(const std::string& arm_id, ArmClaimedMap& arm_claim_m
bool
hasConflictingMultiClaim
(
const
ResourceWithClaimsMap
&
resource_map
)
{
for
(
const
auto
&
resource
:
resource_map
)
{
if
(
resource
.
second
.
size
()
>
2
)
{
ROS_ERROR_STREAM
(
"FrankaHW: Resource "
<<
resource
.
first
<<
" claimed with more than two interfaces. Conflict!"
);
ROS_ERROR_STREAM
(
"Resource conflict: "
<<
resource
.
first
<<
" is claimed with more than two command interfaces "
"which is not supported."
);
return
true
;
}
uint8_t
torque_claims
=
0
;
...
...
@@ -154,9 +154,10 @@ bool hasConflictingMultiClaim(const ResourceWithClaimsMap& resource_map) {
}
}
if
(
torque_claims
!=
1
)
{
ROS_ERROR_STREAM
(
"
FrankaHW: Resource
"
ROS_ERROR_STREAM
(
"
Resource conflict:
"
<<
resource
.
first
<<
" is claimed with two non-compatible interfaces. Conflict!"
);
<<
" is claimed with a combination of two interfaces that is not "
"supported."
);
return
true
;
}
}
...
...
@@ -174,8 +175,9 @@ bool hasConflictingJointAndCartesianClaim(const ArmClaimedMap& arm_claim_map,
arm_claim_map
.
at
(
arm_id
).
joint_position_claims
+
arm_claim_map
.
at
(
arm_id
).
joint_velocity_claims
>
0
))
{
ROS_ERROR_STREAM
(
"FrankaHW: Invalid claims on joint AND cartesian level on arm "
<<
arm_id
<<
". Conflict!"
);
ROS_ERROR_STREAM
(
"Resource conflict: Invalid combination of claims on joint AND cartesian level on arm "
<<
arm_id
<<
" which is not supported."
);
return
true
;
}
}
...
...
@@ -192,8 +194,9 @@ bool partiallyClaimsArmJoints(const ArmClaimedMap& arm_claim_map, const std::str
arm_claim_map
.
at
(
arm_id
).
joint_velocity_claims
!=
7
)
||
(
arm_claim_map
.
at
(
arm_id
).
joint_torque_claims
>
0
&&
arm_claim_map
.
at
(
arm_id
).
joint_torque_claims
!=
7
))
{
ROS_ERROR_STREAM
(
"FrankaHW: Non-consistent claims on the joints of "
<<
arm_id
<<
". Not supported. Conflict!"
);
ROS_ERROR_STREAM
(
"Resource conflict: Partially claiming joints of arm "
<<
arm_id
<<
" is not supported. Make sure to claim all 7 joints of the robot."
);
return
true
;
}
}
...
...
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