File tree 11 files changed +39
-233
lines changed
11 files changed +39
-233
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,8 @@ catkin_package(
117
117
# include_directories(include)
118
118
include_directories (
119
119
${catkin_INCLUDE_DIRS}
120
- /home/binnur2/robotics/MoreProject/OpenNI2/ Include
121
- /home/binnur2/robotics/MoreProject/nite/ Include
120
+ $ENV{NITE2_INCLUDE}
121
+ $ENV{OPENNI2_INCLUDE}
122
122
)
123
123
124
124
## Declare a C++ library
@@ -145,8 +145,8 @@ include_directories(
145
145
## Specify libraries to link a library or executable target against
146
146
target_link_libraries (${PROJECT_NAME}
147
147
${catkin_LIBRARIES}
148
- /home/binnur2/robotics/MoreProject/OpenNI2/Bin/x64-Release/libOpenNI2 .so
149
- /home/binnur2/robotics/MoreProject/nite/Redist/libNiTE2 .so
148
+ $ENV{NITE2_REDIST64} /libNiTE2 .so
149
+ $ENV{OPENNI2_REDIST64} /libOpenNI2 .so
150
150
)
151
151
152
152
#############
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- ~/robotics/MoreProject/rosIndigo/src/skeleton_tracking$ rosrun skeleton_tracking skeleton_tracking Captured.oni
1
+ Download and Install OpenNI from http://structure.io/openni
2
+ Download and Install Nite from https://www.dropbox.com/s/c46upw6s8ml6i0t/nite.zip?dl=0
3
+ Install scripts will create NiTEDevEnvironment and OpenNIDevEnvironment
4
+ Source NiTEDevEnvironment and OpenNIDevEnvironment from .bashrc
5
+ Source .bashrc
2
6
3
- ~/robotics/MoreProject/rosIndigo$ catkin_make
7
+ clone the ros package in https://github.com/binnurr/joint_extractor
8
+ copy the NiTE2 folder under nite/Redist/ to devel folder of the package
9
+ (it should be in the same directory with executable file)
10
+
11
+ to control the avatar in Morse with skeleton tracking package, please run the followings;
12
+
13
+ roscore
14
+ morse run morse/examples/tutorials/new_human_control.py
15
+ roslaunch skeleton_tracking tracking.launch (which plays the .Oni file written in the launch file)
16
+
17
+ or
18
+
19
+ roscore
20
+ morse run morse/examples/tutorials/new_human_control.py
21
+ roslaunch skeleton_tracking trackingRC.launch (which runs on real stream from Asus Xtion)
22
+
23
+
24
+ to record a .Oni file simply run NiViewer under OpenNI2/Bin
25
+ press S (recording will start)
26
+ press any key to stop recording
27
+ Then copy this .Oni file to the directory of executable of skeleton tracking (which is devel folder)
28
+
29
+ Please also note that this code runs with the morse code which allows rotations along 3 axes
30
+ To get the relevant morse branch, go to
31
+ https://github.com/binnurr/morse/tree/skeleton_tracking/
4
32
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class TrackUserNode
57
57
58
58
ac = new actionlib::SimpleActionClient<pr2_controllers_msgs::JointTrajectoryAction>(topic_name, true );
59
59
ROS_INFO (" Waiting for action server to start." );
60
- // ac->waitForServer(); //will wait for infinite time
60
+ ac->waitForServer (); // will wait for infinite time
61
61
ROS_INFO (" Action server started, sending goal." );
62
62
63
63
// create subscribers
@@ -134,9 +134,9 @@ class TrackUserNode
134
134
135
135
while (nh.ok ())
136
136
{
137
- ros::Duration dur = ros::Time::now () - previous;
138
- previous = ros::Time::now ();
139
- // std::cout<<"TimePassed: "<<dur.toSec()<<std::endl;
137
+ // ros::Duration dur = ros::Time::now() - previous;
138
+ // previous = ros::Time::now();
139
+ // std::cout<<"TimePassed: "<<dur.toSec()<<std::endl;
140
140
trackUserNI.waitAndUpdateAll ();
141
141
142
142
// do all processing here
@@ -154,7 +154,7 @@ class TrackUserNode
154
154
goal.trajectory .points [0 ].positions [i] = joints[jointIndexes[i]];
155
155
}
156
156
goal.trajectory .points [0 ].time_from_start = ros::Duration (0.1 );
157
- // ac->sendGoalAndWait(goal);
157
+ ac->sendGoalAndWait (goal);
158
158
159
159
}
160
160
else if (check==6 ){
You can’t perform that action at this time.
0 commit comments