angusleigh / leg_tracker Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
When the program runs the code line , the node breaks out,but no errors are published.No yaml file are saved.
I suspects there may be some bugs lying here(maybe it's not arranging by rows?):
forest_->train(cv::ml::TrainData::create(
cv::cvarrToMat(cv_data), // train data
cv::ml::ROW_SAMPLE, // tflag
cv::cvarrToMat(cv_resp) // responses (i.e. labels)
// 0, // varldx (?)
// 0, // sampleldx (?)
// 0, // missing data mask
// var_type // variable type
));
I use opencv3.4
Hi,
I am building on ubuntu 18 with ROS melodic and constantly getting the following errors.
CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o: In function `DetectLegClusters::laserCallback(boost::shared_ptr<sensor_msgs::LaserScan_<std::allocator<void> > const> const&)':
detect_leg_clusters.cpp:(.text._ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE[_ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE]+0xc05): undefined reference to `cv::ml::RTrees::getVotes(cv::_InputArray const&, cv::_OutputArray const&, int) const'
collect2: error: ld returned 1 exit status
leg_tracker/CMakeFiles/detect_leg_clusters.dir/build.make:225: recipe for target '/home/alexr/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters' failed
make[2]: *** [/home/alexr/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters] Error 1
CMakeFiles/Makefile2:21967: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
I can make out that the error is related to opencv. I have opencv 3.4.5 sourced installed on my system.
Can you help.
Thanks.
Hi,
After clonning the repository to my catkin workspace, and after make the installations required (python-scipy and pykalman), I performed the catkin_make and I got the following error:
[ 83%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters
[ 86%] Building CXX object leg_tracker/CMakeFiles/extract_positive_training_clusters.dir/src/laser_processor.cpp.o
CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o: In function `DetectLegClusters::laserCallback(boost::shared_ptr<sensor_msgs::LaserScan_<std::allocator<void> > const> const&)':
detect_leg_clusters.cpp:(.text._ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE[_ZN17DetectLegClusters13laserCallbackERKN5boost10shared_ptrIKN11sensor_msgs10LaserScan_ISaIvEEEEE]+0x6bc): undefined reference to `cv::ml::RTrees::getVotes(cv::_InputArray const&, cv::_OutputArray const&, int) const'
collect2: error: ld returned 1 exit status
leg_tracker/CMakeFiles/detect_leg_clusters.dir/build.make:226: recipe for target '/home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters' failed
make[2]: *** [/home/joao-nisa/catkin_ws/devel/lib/leg_tracker/detect_leg_clusters] Error 1
CMakeFiles/Makefile2:830: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 88%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/train_leg_detector
[ 88%] Built target train_leg_detector
[ 91%] Linking CXX executable /home/joao-nisa/catkin_ws/devel/lib/leg_tracker/extract_positive_training_clusters
[ 91%] Built target extract_positive_training_clusters
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
I got the Melodic version of ROS and the OpenCV is the required, 3.4.0.
Can you help me to fix this problem?
Thanks in advance!
Hi, when I use my dataset to retrain the leg_tracker, something wrong.
1、in cluster_features.cpp, when the num_points <= 2, repoet an Opencv error.log like this:
OpenCV Error: Bad argument (The function can not solve under-determined linear systems) in solve, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/lapack.cpp, line 1250
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/lapack.cpp:1250: error: (-5) The function can not solve under-determined linear systems in function solve
2、I add a if(num_points <=2) ,and loadPoseData is ok, but when train(), it crashed angin~
Hi!
First of all , thanks for your great work!
I was testing the code in order to do a demo like this one And I'm getting some where but I do need the robot to track or at least detect me even when we are 7 or 10 meters apart.
For instance even though I increase the max_detect_distance
the 'real' maximum detection distance is around 4 or 5 meters.
Does this have something to do with a training parameter I'm missing or with the local_occupancy_grid_map
node. I'm actually taking this demo launch file as starting point.
Your help would be appreciated,
Regards,
ItsJas.
Why can't I retrain a model, which could show a similar performance on 'stationary' dataset with the given model? (p.s. I have used the given training code.)
Hi,
I have a bunch of bagfiles of LaserScan data with people exposing their legs in front of a MOnarCH and I want to use your leg_tracker to get the detections results from those bagfiles and compare them with another leg detector.
What do I have to make to get those detection results?
I'm a ROS Rookie, so pardon me if this is a truly beginner question.
Thanks in advance
Dear @angusleigh, I'm very thankful for this repo, it has been very useful in most cases developing our following robot.
However there are certain cases when we observed 'ghost detections' trailing on one side of the target when walking near to a wall, this false positive can then cause unwanted id switches. Also we observed a blind spot in the front left of the robot where the lidar is less likely to not detect the pair of legs. Based on these observations my questions are:
Hi, thank you for your useful work, I am learning from your project.
For now, I have retrained followed your guide and used my own bags. However, when I roslaunch one demo bag file similar to your example demo bags, there always a local occupancy grid map error.
error messages:
[local_occupancy_grid_mapping-3] process has died [pid 28131, exit code -11, cmd /home/wl/catkin_ws/devel/lib/leg_tracker/local_occupancy_grid_mapping __name:=local_occupancy_grid_mapping __log:=/home/wl/.ros/log/23018c14-ebcf-11e7-b411-8056f2944e1f/local_occupancy_grid_mapping-3.log].
log file: /home/wl/.ros/log/23018c14-ebcf-11e7-b411-8056f2944e1f/local_occupancy_grid_mapping-3*.log
and, the so called "******.log"file didn't exist or empty.
There something like some mistakes in local_occupancy_grid_mapping.cpp?
Could you give some advice? Many thanks!
Is there a parameter to set to get fewer number of clusters, I've checked that most clusters returned from leg detector are nearly identical, differ only by 0.01 decimal place. Does a cluster represent a pair of legs or just one leg? Thank you.
Hello,
We have been running the Leg Tracker, and when we set Publish Occluded to true, the leg tracker tries to give a continuous output, but if it loses the person being tracked, it continues to publish a person track that drifts off to a random place and then disappears rather than disappearing quickly.
If we set publish occluded to false, we get jitters in the person tracked output (i.e. person tracked, then a split second loss of the person, then reacquiring them).
Has anyone seen or solved this issue? It seems to be a glitch because the tracked person, once lost, will drift off randomly with published occluded set to true for nearly a second or two.
Are there any plans to add ROS Noetic support? I think the python 2 -> 3 migration should be trivial but ROS Noetic ships with OpenCV version 4.2.0 instead of 3.2.0, which causes errors upon building the package with catkin_make.
[ 89%] Built target add_two_ints_client
[ 89%] Built target add_two_ints_server
[ 89%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_wifi_signal_sub.dir/src/WifiSignalSubNode.cpp.o
[ 89%] Linking CXX executable /home/ros/catkin_ws/devel/lib/leg_tracker/train_leg_detector
CMakeFiles/train_leg_detector.dir/src/train_leg_detector.cpp.o: In function cv::Mat::Mat(int, int, int, void*, unsigned long)': train_leg_detector.cpp:(.text._ZN2cv3MatC2EiiiPvm[_ZN2cv3MatC5EiiiPvm]+0x296): undefined reference to
cv::Mat::updateContinuityFlag()'
collect2: error: ld returned 1 exit status
leg_tracker/CMakeFiles/train_leg_detector.dir/build.make:226: recipe for target '/home/ros/catkin_ws/devel/lib/leg_tracker/train_leg_detector' failed
make[2]: *** [/home/ros/catkin_ws/devel/lib/leg_tracker/train_leg_detector] Error 1
CMakeFiles/Makefile2:7304: recipe for target 'leg_tracker/CMakeFiles/train_leg_detector.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/train_leg_detector.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 90%] Linking CXX executable /home/ros/catkin_ws/devel/lib/rtabmap_ros/wifi_signal_sub
/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /home/ros/catkin_ws/devel/lib/librtabmap_ros.so, may conflict with libopencv_core.so.3.4
[ 90%] Built target rtabmap_wifi_signal_sub
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2 -l2" failed
Hi,
Currently running on ROS Melodic with OpenCV 3.4.2.
This error occur after applying the solution for issue #17
Any idea on solving this issue, thanks in advance.
I use openCV 3.4.1. I cannot get the yaml file
Dear angusleigh
First of all thank you for allowing your work in the open for us, I have personally been learning a lot.
I just had one question though, I was wondering if you knew of any kind of other kalman filters that we can use other than the give pykalman.
We have read your ICRA2015 paper and it is inspiring and we decided to use the leg_tracker package to work on our robotics project. However, there's some question about the usage of this package.
We are using a Velodyne LiDAR to record the positive and negative ROS bags, and it was recorded as 2D \scan messages.
When the retraining was done, we can not run this bag very well, it did not track any people. But the demos are still fine.
Is the problem with the bag recorded which we used to retrain? Or the problem with the parameters we still need tunning?
Hello,
We are working to integrate Leg Tracker, and are running into a few issues.
We have been try to figure out what could be the reason for the catkin_make to fail on raspberry pi.
Below is the error which we get when we do a catkin_make in our ROS workspace. We believe the error is because the CvRTrees object forest_ is not recognized as type CvRTrees. We have done the below trouble shooting:
Other possibilities which we can think of is that the ROS package is in indigo and we are running ROS kinetic on a Raspberry Pi 3.
Could anyone here let us know if we are missing anything or suggest any approaches to fix this issue? Below is an error log.
agr@agr-desktop:~/catkin_ws$ catkin_make
Base path: /home/agr/catkin_ws
Source space: /home/agr/catkin_ws/src
Build space: /home/agr/catkin_ws/build
Devel space: /home/agr/catkin_ws/devel
Install space: /home/agr/catkin_ws/install
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] Built target geometry_msgs_generate_messages_cpp
[ 5%] Built target sweep_node
[ 5%] Built target leg_tracker_generate_messages_check_deps_Leg
[ 5%] Built target geometry_msgs_generate_messages_eus
[ 5%] Built target leg_tracker_generate_messages_check_deps_LegArray
[ 5%] Built target leg_tracker_generate_messages_check_deps_Person
[ 5%] Built target std_msgs_generate_messages_eus
[ 5%] Built target leg_tracker_generate_messages_check_deps_PersonArray
[ 5%] Built target std_msgs_generate_messages_nodejs
[ 5%] Built target geometry_msgs_generate_messages_nodejs
[ 5%] Built target geometry_msgs_generate_messages_py
[ 5%] Built target std_msgs_generate_messages_py
[ 5%] Built target geometry_msgs_generate_messages_lisp
[ 5%] Built target std_msgs_generate_messages_lisp
[ 15%] Built target leg_tracker_generate_messages_cpp
[ 26%] Built target leg_tracker_generate_messages_nodejs
[ 39%] Built target leg_tracker_generate_messages_py
[ 50%] Built target leg_tracker_generate_messages_lisp
[ 50%] Built target leg_tracker_gencpp
[ 63%] Built target leg_tracker_generate_messages_eus
[ 71%] Built target extract_positive_training_clusters
[ 78%] Built target local_occupancy_grid_mapping
[ 81%] Building CXX object leg_tracker/CMakeFiles/train_leg_detector.dir/src/train_leg_detector.cpp.o
[ 84%] Building CXX object leg_tracker/CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o
[ 84%] Built target leg_tracker_generate_messages
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:294:3: error: ‘CvRTrees’ does not name a type
CvRTrees forest;
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp: In member function ‘void TrainLegDetector::train()’:
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:188:34: error: ‘CV_VAR_ORDERED’ was not declared in this scope
cvSet( var_type, cvScalarAll(CV_VAR_ORDERED));
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:189:41: error: ‘CV_VAR_CATEGORICAL’ was not declared in this scope
cvSetReal1D( var_type, feat_count, CV_VAR_CATEGORICAL );
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:196:5: error: ‘CvRTParams’ was not declared in this scope
CvRTParams fparam(
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:210:5: error: ‘forest’ was not declared in this scope
forest.train(
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:212:7: error: ‘CV_ROW_SAMPLE’ was not declared in this scope
CV_ROW_SAMPLE, // tflag
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:218:7: error: ‘fparam’ was not declared in this scope
fparam // parameters
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp: In member function ‘void TrainLegDetector::test(bool)’:
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:260:11: error: ‘forest_’ was not declared in this scope
if (forest_.predict( tmp_mat) > 0)
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:271:11: error: ‘forest_’ was not declared in this scope
if (forest_.predict( tmp_mat ) < 0)
^
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp: In member function ‘void TrainLegDetector::save()’:
/home/agr/catkin_ws/src/leg_tracker/src/train_leg_detector.cpp:289:5: error: ‘forest_’ was not declared in this scope
forest_.save(save_file_.c_str());
^
leg_tracker/CMakeFiles/train_leg_detector.dir/build.make:62: recipe for target 'leg_tracker/CMakeFiles/train_leg_detector.dir/src/train_leg_detector.cpp.o' failed
make[2]: *** [leg_tracker/CMakeFiles/train_leg_detector.dir/src/train_leg_detector.cpp.o] Error 1
CMakeFiles/Makefile2:1431: recipe for target 'leg_tracker/CMakeFiles/train_leg_detector.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/train_leg_detector.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/agr/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp:112:3: error: ‘CvRTrees’ does not name a type
CvRTrees forest;
^
/home/agr/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp: In constructor ‘DetectLegClusters::DetectLegClusters()’:
/home/agr/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp:98:5: error: ‘forest’ was not declared in this scope
forest.load(forest_file.c_str());
^
/home/agr/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp: In member function ‘void DetectLegClusters::laserCallback(const ConstPtr&)’:
/home/agr/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp:208:38: error: ‘forest’ was not declared in this scope
float probability_of_leg = forest.predict_prob(tmp_mat);
^
leg_tracker/CMakeFiles/detect_leg_clusters.dir/build.make:62: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o' failed
make[2]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/src/detect_leg_clusters.cpp.o] Error 1
CMakeFiles/Makefile2:1545: recipe for target 'leg_tracker/CMakeFiles/detect_leg_clusters.dir/all' failed
make[1]: *** [leg_tracker/CMakeFiles/detect_leg_clusters.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
Is it possible to implement human following robot with this leg_tracker source. We can only do the detection and tracking legs by using this source code .
Is there any possibility of implementing human following application with this source.
Please do respond
Thank you in advance,
Aswin P
Hi, we implemented such functionnality with a former coworker.
From what I recall, we follow that path :
leg_tracker
with people_tracker
to get /people_tracked
/people_tracked
to issue /cmd_vel
(basic PID control)Depending on the quality of your odom
frame, you can do that in odom frame or robot frame.
Let me know if you succeed !
Originally posted by @pmirabel in #23 (comment)
In the readme for the leg_tracker, it states to "gather negative examples by moving the scanner on a moble platform around empty rooms."
Does this imply that it is best to have the negative dataset in a fairly clean environment? Or should the negative dataset include a lot of noise (i.e. signs/poles/etc. if used on city streets)?
How environment specific does the negative dataset have to be? Does the leg tracker need to be retrained for every use case environment?
Thanks!
I am able to get joint_leg_tracker running, but I am not able to see the output real-time in rviz. I have added all the visualizable topics in rviz, but am getting the message "No map received" on the map "/local_map" topic. I would like to be able to see the same type of output in rviz that is in the sample stationary demo launch file. I am new to ROS, so I apologize if this is a trivial question.
Hello,
Just came across this nice ROS package, and am testing it out now.
I noticed that git pull was taking a while from the repo and then saw you've added large binary bag files to the git repo history. Might I recommend, as this repo still only has 3 commits, to rebase the repo and instead host the bag files via Git Large File Storage (LFS)? This is free for GitHub, under 1GB, which should be more that enough here.
You might also want to do the same with the large opencv random forests yaml files, that way updating the trained models also doesn't incur large repo sizes.
Great project!
in Line 783 of joint_leg_tracker.py, the "person" is a DetectedCluster object, and does not have the seen_in_current_scan attribute. Hence error pops up while running the joint_leg_tracker launch file. This happens when "publish_occluded" parameter is set to "false".
Hi,
I have been using this package to try and follow someone but, the laser I use is of 40Hz and the program does not work well. I down-sampled to 15Hz and still doesn't work as well. Is there anyway I can tune it to 40Hz? Thank you.
Hi,
What is the minimum amount of training data needed to retrain the classifier? And how much training data did you use to train the classifier?
Thanks
Hi, the package.xml file currently specifies a "TODO" license. I saw that some CPP files are under BSD license, but the Python files (e.g. the joint_leg_tracker.py) have no license attached at all. Is this entire repository under the BSD?
Maybe you could add a LICENSE file or a statement in the README to clarify.
Hello, I am trying to understand which frame it is better to use in my specific case for the joint_leg_tracker part.
My understansing of odom versus base_link frame is that :
It is pretty clear for me that I have to use odom frame if I am moving... But I can't explain it very clearly... can anyone explain this part to me ?
thank you!
When I run catkin_make, there are some errors:
Built target extract_positive_training_clusters
/home/ohayoo/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp: In member function ‘void DetectLegClusters::laserCallback(const ConstPtr&)’:
/home/ohayoo/catkin_ws/src/leg_tracker/src/detect_leg_clusters.cpp:213:19: error: ‘class cv::ml::RTrees’ has no member named ‘getVotes’
forest->getVotes(cv::cvarrToMat(tmp_mat), result, 0);
^
I use openCV 3.2. Is the version appropriate?
all the code you provide is built according to ROS1. now i have ROS2 i get a lot of problem trying using your project ( and i am beginner) . is that any simple way to do it or i have to change it all?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.