forked from hojonathanho/bulletsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
127 lines (92 loc) · 4.18 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Simulation environment with Bullet physics
** Linux Compilation for Alex's branch **
Install the required dependencies using apt-get (this is incomplete):
sudo apt-get install ros-fuerte-desktop-full libopenscenegraph-dev cmake-curses-gui python-networkx
Maybe these ones too:
sudo apt-get install ros-fuerte-openni-camera ros-fuerte-openni-launch
Prepare to install openrave:
sudo add-apt-repository ppa:openrave/release
sudo apt-get update
Now, open the synaptic ('sudo synaptic') gui:
openrave0.6-dp-dev
openrave0.6-dp-plugins-all
openrave0.6-dp-data
If the above doesn't appear in synaptic, in the terminal do these first and then do the synaptic step again:
sudo apt-get remove openrave*
sudo apt-get update
Let BULLETSIM_SOURCE_DIR be the bullesim directory (i.e. the directory cloned by 'git clone [email protected]:hojonathanho/bulletsim.git').
Make a build directory, preferrably outside BULLETSIM_SOURCE_DIR. Let BULLETSIM_BUILD_DIR be this build directory.
Set these two as environment variables. For example (replace with the actual directories):
echo 'export BULLETSIM_SOURCE_DIR=~/rll/bulletsim' >> ~/.bashrc
echo 'export BULLETSIM_BUILD_DIR=~/rll/build' >> ~/.bashrc
Restart the terminal and run the following:
# Setup build directories
cd $BULLETSIM_BUILD_DIR
mkdir bulletsim_msgs
mkdir bulletsim
# Generate makefiles, compile and install bulletsim_msgs
cd $BULLETSIM_BUILD_DIR/bulletsim_msgs
cmake $BULLETSIM_SOURCE_DIR/bulletsim_msgs
make -j
sudo make install
# Generate makefile and compile bulletsim
cd $BULLETSIM_BUILD_DIR/bulletsim
cmake $BULLETSIM_SOURCE_DIR -DJOHNS_ADVENTURES=ON
make -j
# Make a link between every binary in the build directory and a new package in ros named binary_symlinks
roscd
roscreate-pkg binary_symlinks
cd binary_symlinks
mkdir bin
cd bin
for node in $BULLETSIM_BUILD_DIR/bulletsim/bin/* ; do ln -s $node ; done
** Test tracking **
$BULLETSIM_BUILD_DIR/bulletsim/bin/tracker_node --cameraTopics=kinect1
roslaunch point_clouds.launch online:=false filename:=sample_rope
$BULLETSIM_BUILD_DIR/bulletsim/bin/tracker_node --cameraTopics=kinect1
roslaunch point_clouds.launch online:=false filename:=sample_cloth
$BULLETSIM_BUILD_DIR/bulletsim/bin/tracker_node --cameraTopics=kinect1 --cameraTopics=kinect2
roslaunch multi_point_clouds.launch online:=false filename:=knot_tie
$BULLETSIM_BUILD_DIR/bulletsim/bin/tracker_node --cameraTopics=kinect1 --cameraTopics=kinect2
roslaunch multi_point_clouds.launch online:=false filename:=double_fold
** Add a new ros node **
Add the source file (node.cpp) to the respective CMakeLists.txt file.
In BULLETSIM_BUILD_DIR , run
make
Then,
roscd binary_symlinks
cd bin
ln -s BULLETSIM_BUILD_DIR/bin/node
** Add a new ros msg **
Save the msg file in BULLETSIM_SOURCE_DIR/bulletsim_msgs/msg
Add the msg file to the BULLETSIM_SOURCE_DIR/bulletsim_msgs/CMakeLists.txt file.
In BULLETSIM_BUILD_DIR/bullesim_msgs , run
make
sudo make install
** Launch files in $BULLETSIM_SOURCE_DIR/launch **
Summary
point_clouds.launch
Publishes point clouds from a kinect or from a bagfile (online:=false filename:=sample)
Drop some point clouds
Preprocess (segments) the dropped point clouds
multi_point_clouds.launch
Publishes point clouds from two kinects or from two bagfiles (online:=false filename:=sample)
Drop some point clouds
Merges the dropped point clouds
Preprocesses (segments) the merged point clouds
record_cloud.launch and record_two_clouds.launch
Records point clouds
Example 1: One kinect
# Get live point clouds from the kinect and record them to a bagfile
roslaunch point_clouds.launch
roslaunch record_cloud.launch filename:=sample
# Replay from the saved bagfile
roslaunch point_clouds.launch online:=false filename:=sample
Example 2: Two kinects
# Get live point clouds from two kinects and record them to two bagfiles
roslaunch multi_point_clouds.launch
roslaunch record_two_clouds.launch filename:=sample
# Replay from the saved bagfile
roslaunch multi_point_clouds.launch online:=false filename:=sample
Note
When replaying, use_sim_time needs to be true. This is set automatically, but for all nodes to see this change, they need to be restarted (including rviz).