Skip to content

Commit b0b2a6f

Browse files
committed
Read me is updated, cmake file is updated with openni and nite environment variables
1 parent fec13dc commit b0b2a6f

11 files changed

+39
-233
lines changed

CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ catkin_package(
117117
# include_directories(include)
118118
include_directories(
119119
${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}
122122
)
123123

124124
## Declare a C++ library
@@ -145,8 +145,8 @@ include_directories(
145145
## Specify libraries to link a library or executable target against
146146
target_link_libraries(${PROJECT_NAME}
147147
${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
150150
)
151151

152152
#############

NiTE2/.svn/all-wcprops

-29
This file was deleted.

NiTE2/.svn/entries

-167
This file was deleted.

NiTE2/.svn/prop-base/h.dat.svn-base

-5
This file was deleted.

NiTE2/.svn/prop-base/s.dat.svn-base

-5
This file was deleted.

NiTE2/.svn/text-base/FeatureExtraction.ini.svn-base

-13
This file was deleted.

NiTE2/.svn/text-base/HandAlgorithms.ini.svn-base

-3
This file was deleted.

NiTE2/.svn/text-base/h.dat.svn-base

-732 KB
Binary file not shown.

NiTE2/.svn/text-base/s.dat.svn-base

-732 KB
Binary file not shown.

README

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
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
26

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/
432

src/TrackUserNode.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TrackUserNode
5757

5858
ac = new actionlib::SimpleActionClient<pr2_controllers_msgs::JointTrajectoryAction>(topic_name, true);
5959
ROS_INFO("Waiting for action server to start.");
60-
//ac->waitForServer(); //will wait for infinite time
60+
ac->waitForServer(); //will wait for infinite time
6161
ROS_INFO("Action server started, sending goal.");
6262

6363
// create subscribers
@@ -134,9 +134,9 @@ class TrackUserNode
134134

135135
while(nh.ok())
136136
{
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;
140140
trackUserNI.waitAndUpdateAll();
141141

142142
// do all processing here
@@ -154,7 +154,7 @@ class TrackUserNode
154154
goal.trajectory.points[0].positions[i] = joints[jointIndexes[i]];
155155
}
156156
goal.trajectory.points[0].time_from_start = ros::Duration(0.1);
157-
//ac->sendGoalAndWait(goal);
157+
ac->sendGoalAndWait(goal);
158158

159159
}
160160
else if(check==6){

0 commit comments

Comments
 (0)