Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CCF Immersive Sorting Demo
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
CeTI
ROS
CeTI Cobotic Framework
CCF Immersive Sorting Demo
Commits
cc9dd5d1
Commit
cc9dd5d1
authored
3 years ago
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
alignment
parent
4968417d
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
src/dummy_sorting_controller.cpp
+3
-7
3 additions, 7 deletions
src/dummy_sorting_controller.cpp
src/moveit_sorting_controller.cpp
+1
-5
1 addition, 5 deletions
src/moveit_sorting_controller.cpp
with
4 additions
and
12 deletions
src/dummy_sorting_controller.cpp
+
3
−
7
View file @
cc9dd5d1
...
...
@@ -18,7 +18,7 @@
#include
"ccf/connection/MqttConnection.h"
#include
"ccf/util/NodeUtil.h"
std
::
string
NODE_NAME
=
"
dummy_sorting_controller
"
;
std
::
string
NODE_NAME
=
"
ceti_cell_placeworld
"
;
using
CetiRosToolbox
::
getParameter
;
using
CetiRosToolbox
::
getPrivateParameter
;
...
...
@@ -42,14 +42,14 @@ int main(int argc, char **argv)
std
::
unique_ptr
<
MqttConnection
>
mqtt_connection
=
std
::
make_unique
<
MqttConnection
>
(
mqttServer
,
ros
::
this_node
::
getName
());
mqtt_connection
->
listen
(
getParameter
<
std
::
string
>
(
n
,
"topics/selection"
,
"selection"
));
auto
commandTopic
=
getParameter
(
n
,
"topics/command"
,
ros
::
this_node
::
getName
()
+
"
/command"
);
auto
commandTopic
=
getParameter
<
std
::
string
>
(
n
,
"topics/command"
,
"/ceti_cell_placeworld
/command"
);
mqtt_connection
->
listen
(
commandTopic
);
auto
other_cell_topic
=
getPrivateParameter
<
std
::
string
>
(
"other_cell"
,
"/ceti_cell_2_placeworld/scene/update"
);
mqtt_connection
->
listen
(
other_cell_topic
);
controller
.
addConnection
(
std
::
move
(
mqtt_connection
));
controller
.
addCallback
(
other_cell_topic
,
[
&
controller
](
auto
msg
)
{
ROS_
WARN
_STREAM
(
"Updating scene from other cell"
);
ROS_
INFO
_STREAM
(
"Updating scene from other cell
.
"
);
Scene
scene
;
scene
.
ParseFromString
(
msg
);
controller
.
initScene
(
scene
,
false
);
...
...
@@ -68,10 +68,6 @@ int main(int argc, char **argv)
ROS_INFO_STREAM
(
"Sending scene manually (triggered by a message to the 'send_scene' topic)"
);
controller
.
sendScene
();
});
//ros::Timer timer = n.createTimer(ros::Duration(10), [&controller](
// const ros::TimerEvent &event)
//{ controller.sendScene(); }); // send a scene every ten seconds
auto
pick_place_callback
=
[
&
controller
](
const
Command
&
command
)
{
...
...
This diff is collapsed.
Click to expand it.
src/moveit_sorting_controller.cpp
+
1
−
5
View file @
cc9dd5d1
...
...
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
controller
.
addConnection
(
std
::
move
(
mqtt_connection
));
controller
.
addCallback
(
other_cell_topic
,
[
&
controller
](
auto
msg
)
{
ROS_
WARN
_STREAM
(
"Updating scene from other cell"
);
ROS_
INFO
_STREAM
(
"Updating scene from other cell
.
"
);
Scene
scene
;
scene
.
ParseFromString
(
msg
);
controller
.
initScene
(
scene
,
false
);
...
...
@@ -68,10 +68,6 @@ int main(int argc, char **argv)
ROS_INFO_STREAM
(
"Sending scene manually (triggered by a message to the 'send_scene' topic)"
);
controller
.
sendScene
();
});
//ros::Timer timer = n.createTimer(ros::Duration(10), [&controller](
// const ros::TimerEvent &event)
//{ controller.sendScene(); }); // send a scene every ten seconds
auto
pick_place_callback
=
[
&
controller
](
const
Command
&
command
)
{
...
...
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