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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
CeTI
ROS
ROS Packages
franka_description
Commits
206a8815
Commit
206a8815
authored
7 years ago
by
Simon Gabl
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/develop'.
parents
01988195
4c98d7ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
franka_gripper/src/franka_gripper_node.cpp
+9
-11
9 additions, 11 deletions
franka_gripper/src/franka_gripper_node.cpp
with
10 additions
and
11 deletions
CHANGELOG.md
+
1
−
0
View file @
206a8815
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
to the robot state
to the robot state
*
Updated and improved examples.
*
Updated and improved examples.
*
Fix includes for Eigen3 in
`franka_example_controllers`
*
Fix includes for Eigen3 in
`franka_example_controllers`
*
Fixed gripper state publishing in
`franka_gripper_node`
## 0.1.2 - 2017-10-10
## 0.1.2 - 2017-10-10
...
...
This diff is collapsed.
Click to expand it.
franka_gripper/src/franka_gripper_node.cpp
+
9
−
11
View file @
206a8815
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include
<ros/rate.h>
#include
<ros/rate.h>
#include
<ros/spinner.h>
#include
<ros/spinner.h>
#include
<sensor_msgs/JointState.h>
#include
<sensor_msgs/JointState.h>
#include
<xmlrpcpp/XmlRpc.h>
#include
<franka/gripper_state.h>
#include
<franka/gripper_state.h>
#include
<franka_gripper/franka_gripper.h>
#include
<franka_gripper/franka_gripper.h>
...
@@ -133,28 +132,27 @@ int main(int argc, char** argv) {
...
@@ -133,28 +132,27 @@ int main(int argc, char** argv) {
<<
publish_rate
);
<<
publish_rate
);
}
}
XmlRpc
::
XmlRpcValue
par
ams
;
std
::
vector
<
std
::
string
>
joint_n
am
e
s
;
if
(
!
node_handle
.
getParam
(
"joint_names"
,
par
ams
))
{
if
(
!
node_handle
.
getParam
(
"joint_names"
,
joint_n
am
e
s
))
{
ROS_ERROR
(
"franka_gripper_node: Could not parse joint_names!"
);
ROS_ERROR
(
"franka_gripper_node: Could not parse joint_names!"
);
return
-
1
;
return
-
1
;
}
}
if
(
par
ams
.
size
()
!=
2
)
{
if
(
joint_n
am
e
s
.
size
()
!=
2
)
{
ROS_ERROR
(
"franka_gripper_node: Got wrong number of joint_names!"
);
ROS_ERROR
(
"franka_gripper_node: Got wrong number of joint_names!"
);
return
-
1
;
return
-
1
;
}
}
std
::
vector
<
std
::
string
>
joint_names
(
params
.
size
());
for
(
int
i
=
0
;
i
<
params
.
size
();
++
i
)
{
joint_names
[
i
]
=
static_cast
<
std
::
string
>
(
params
[
i
]);
}
franka
::
GripperState
gripper_state
;
franka
::
GripperState
gripper_state
;
std
::
mutex
gripper_state_mutex
;
std
::
mutex
gripper_state_mutex
;
std
::
thread
read_thread
([
&
gripper_state
,
&
gripper
,
&
gripper_state_mutex
]()
{
std
::
thread
read_thread
([
&
gripper_state
,
&
gripper
,
&
gripper_state_mutex
]()
{
ros
::
Rate
read_rate
(
10
);
ros
::
Rate
read_rate
(
10
);
while
(
read_rate
.
sleep
()
&&
ros
::
ok
())
{
while
(
ros
::
ok
())
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
gripper_state_mutex
);
{
std
::
lock_guard
<
std
::
mutex
>
_
(
gripper_state_mutex
);
updateGripperState
(
gripper
,
&
gripper_state
);
updateGripperState
(
gripper
,
&
gripper_state
);
}
}
read_rate
.
sleep
();
}
});
});
ros
::
Publisher
gripper_state_publisher
=
ros
::
Publisher
gripper_state_publisher
=
...
...
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