{"id":13755315,"url":"https://github.com/bayesian-object-tracking/dbot_ros","last_synced_at":"2025-05-10T01:30:38.093Z","repository":{"id":201763539,"uuid":"43368915","full_name":"bayesian-object-tracking/dbot_ros","owner":"bayesian-object-tracking","description":"ROS package of Depth-Based Bayesian Object Tracking","archived":false,"fork":false,"pushed_at":"2020-03-16T10:31:45.000Z","size":2572,"stargazers_count":57,"open_issues_count":4,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-03T10:02:17.576Z","etag":null,"topics":["gaussian-filter","kalman-filter","object-tracking","particle-filter","tracker","tracker-service"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bayesian-object-tracking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-09-29T13:25:55.000Z","updated_at":"2024-01-22T10:47:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"48e11905-6ec8-48dc-989d-a4978cd7f855","html_url":"https://github.com/bayesian-object-tracking/dbot_ros","commit_stats":null,"previous_names":["bayesian-object-tracking/dbot_ros"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesian-object-tracking%2Fdbot_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesian-object-tracking%2Fdbot_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesian-object-tracking%2Fdbot_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bayesian-object-tracking%2Fdbot_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bayesian-object-tracking","download_url":"https://codeload.github.com/bayesian-object-tracking/dbot_ros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224900798,"owners_count":17388942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gaussian-filter","kalman-filter","object-tracking","particle-filter","tracker","tracker-service"],"created_at":"2024-08-03T10:00:52.018Z","updated_at":"2024-11-16T09:30:34.806Z","avatar_url":"https://github.com/bayesian-object-tracking.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# ROS Depth Based Object Tracking Library (dbot_ros)\n\nThis package extends the [dbot](https://github.com/bayesian-object-tracking/dbot) library by ros node applications which run the trackers within the ros eco-system. The main content of this package are two tracker nodes for the trackers provided in dbot. Additionally, the package contains a tracker service which is based on the particle filter based tracker.\nAll trackers require object mesh models in Wavefront (.obj) format. To get started, we recommend that you follow the instructions at https://github.com/bayesian-object-tracking/getting_started.\n\n# Requirements\n * MS Kinect or Asus XTION depth sensor\n * Ubuntu 14.04\n * Tested with [ROS Indigo](http://wiki.ros.org/indigo)\n * c++11 Compiler (gcc-4.7 or later)\n * [CUDA](https://developer.nvidia.com/cuda-downloads) 6.5 or later (optional)\n \n## Dependecies\n * [dbot](https://github.com/bayesian-object-tracking/dbot)\n * [dbot_ros_msgs](https://github.com/bayesian-object-tracking/dbot_ros_msgs)\n * [Filtering library](https://github.com/filtering-library/fl) (fl)\n * [Eigen](http://eigen.tuxfamily.org/) 3.2.1 or later\n \n \n# Compiling\n```bash\n$ cd $HOME\n$ mkdir -p projects/tracking/src  \n$ cd projects/tracking/src\n$ git clone git@github.com:filtering-library/fl.git\n$ git clone git@github.com:bayesian-object-tracking/dbot.git\n$ git clone git@github.com:bayesian-object-tracking/dbot_ros_msgs.git\n$ git clone git@github.com:bayesian-object-tracking/dbot_ros.git\n$ cd ..\n$ catkin_make -DCMAKE_BUILD_TYPE=Release -DDBOT_BUILD_GPU=On\n```\nIf no CUDA enabled device is available, you can deactivate the GPU implementation via \n```bash\n$ catkin_make -DCMAKE_BUILD_TYPE=Release -DDBOT_BUILD_GPU=Off\n```\n# Configuration\nThe configuration files are located in\n```bash\n$ cd $HOME/projects/tracking\n$ source devel/setup.bash\n$ roscd dbot_ros\n$ cd config\n$ ls\n$ ... camera.yaml  \n$ ... object_tracker_services.yaml  \n$ ... object.yaml  \n$ ... particle_tracker.yaml  \n$ ... gaussian_tracker.yaml\n```\n## Camera configuration (camera.yaml)\nThe camera configuration file camera.yaml contains the ros depth image topic and camera info topic names\n```yaml\ndepth_image_topic: /camera/depth/image\ncamera_info_topic: /camera/depth/camera_info \n```\nAdjust the topic names if needed.\n\n#### Object configuration (object.yaml)\nThe trackers assume that the tracked object models exist somewhere as a catkin package in your workspace `$HOME/projects/tracking`. The object.yaml file specifies where to find the mesh.obj file of the object you want to track\n```yaml\nobject:\n  package:    my_object_model_package\n  directory:  model\n  meshes:     [ duck.obj ]\n```\n## Particle filter config (particle_tracker.yaml)\n\nHere you won't need to adjust most of the variables. An important one is whether you want to utilize the GPU or not\n```yaml\nparticle_filter:\n  use_gpu: true \n```\nIf GPU support is not availabe, `set use_gpu: false` to run the tracker on the CPU.\n\n## Gaussian filter config (gaussian_tracker.yaml)\nThe Gaussian filter is a CPU only tracker. You may adjust the filter sensitivity or accuracy by adjusting the noise parameters of the object state transition and observation models. However, the provided default are resonable values. \n```yaml\nobject_transition:\n  linear_sigma: 0.002 \n  angular_sigma: 0.01 \n  velocity_factor: 0.8\n\nobservation:\n  fg_noise_std: 0.001 \n```\nThe provided values are determined for models with time discretized of 33ms given that the depth camera provides images in 30 frames per second.\n\n# Running the trackers\n\nFor all trackers launch the ROS OpenNI camera node to publish the depth camera and run ROS `rviz` visualization tool. Add a point cloud display in rviz. This step is required to initialize the trackers.\n\n## Running and Initializing the Particle Filter Based Tracker\n```bash\n$ roslaunch dbot_ros particle_tracker.launch\n```\nOnce launched, you will have to add an `Interactive Marker` in rviz to initialize the tracker. For that, align the displayed interactive marker with the object's point cloud and click on the object to start the tracker. Finally, add a `Marker` and select the `/particle_tracker/object_model` topic to display the tracked object. The tracking estimate is published under the topic `/particle_tracker/object_state`.\n\n## Running and Initializing the Gaussian Filter Based Tracker\n The procedure is the same as for the particle filter tracker described above.\n ```bash\n$ roslaunch dbot_ros gaussian_tracker.launch\n```\nThe object Marker topic has to be changed to `/gaussian_tracker/object_model` in order to display the tracked object. The tracking estimate is published under the topic `/gaussian_tracker/object_state`.\n\n## Running the Particle Filter via ROS Service\n\nAgain the setup is the same as above except the initialization is different. \n```bash\n$ roslaunch dbot_ros object_tracker_service.launch\n```\nThe service expects a call with the ros message type `ObjectState.msg` located in `dbot_ros_msgs` package\n\n     # name of the object\n     string name   \n     # Object resource identifier\n     ObjectOri ori\n     # Object's initial pose\n     geometry_msgs/PoseStamped pose\n\nThe `ObjectOri.msg` message content is the same as the object.yaml config file\n\n     string package\n     string directory\n     string name\n\nOnce the service is running, you can use ros service call with the `RunObjectTracker.srv` (located in dbot_ros_msgs) to trigger the service to track the desired object. You can call the service either for your own c++ ros node, a python node\nor using the `roservice call` command.\n\n### Run Tracker service via `rosservice call `\nHere is an example on how to trigger the tracker service using the `rosservice call` command\n```bash\n$ rosservice call /object_tracker_service \\\n$ [\n$   my_mug_box,\n$   [object_meshes, object_models, mugbox.obj],\n$   [\n$     [0, 0, /XTOIN],\n$     [\n$       [0, 0, 0.7],\n$       [0, 0, 0, 0]\n$     ]\n$   ]\n$ ]\"\n```\n\nBreaking down the above command line:\nrosservice expects \n```bash\n$ rosservice \u003ccommand\u003e \u003cservice-topic\u003e \"service message value\"\n```\nHere `/object_tracker_service` is the tracker service topic name. What follows is the value of `RunObjectTracker.srv` service definition:\n\n     [ObjectState]\n     ObjectState = [name, ObjectOri, geometry_msgs/PoseStamped]\n     ObjectOri = [package, directory, object_mesh.obj]\n     geometry_msgs/PoseStamped = [header, geometry_msgs/Pose]\n     header = [seq, stamp, frame_id]\n     geometry_msgs/Pose = [position, orientation]\n     position = [x, y, z]\n     orientation = [qx, qy, qz, qw]\n \nThe tracking estimate is published under the topic `/object_tracker_service/object_state`.\n \n### Tracker Service via rospy \nHere is a simple listing to trigger the object tracker service which is available at `dbot_ros/scripts/track_object_service_call_example.py`.\n\n\n\n```python\n#!/usr/bin/env python\n\nimport sys\nimport rospy\nfrom std_msgs.msg import Header\nfrom dbot_ros_msgs.srv import RunObjectTracker\nfrom dbot_ros_msgs.msg import ObjectState\nfrom dbot_ros_msgs.msg import ObjectOri\nfrom geometry_msgs.msg import Point\nfrom geometry_msgs.msg import Quaternion\nfrom geometry_msgs.msg import Pose\nfrom geometry_msgs.msg import PoseStamped\n\ndef track_object(object_name):\n  print \"Waiting for service...\"\n  rospy.wait_for_service(\"/object_tracker_service\")\n\n  try:\n    run_object_tracker = rospy.ServiceProxy('/object_tracker_service', RunObjectTracker)\n\n    # set initial pose\n    pose = Pose(position=Point(0, 0, 0.7),\n                orientation=Quaternion(0, 0, 0, 0))\n\n    # set Object resource identifier to find the model\n    ori = ObjectOri(package = \"object_meshes\",\n                    directory=\"object_models\",\n                    name=object_name + \".obj\")\n\n    # construct the ObjectState message for the service call\n    object_state = ObjectState(\n            name=object_name,\n            ori=ori,\n            pose=PoseStamped(\n                   pose=pose,\n                   header=Header(seq=0, stamp=rospy.Time(0), frame_id='')))\n\n    print \"Calling tracker service to track the %s object\" % object_name\n    run_object_tracker(object_state)\n  except rospy.ServiceException, e:\n      print \"Calling object tracker service failed: %s\" % e\n\nif __name__ == \"__main__\":\n  track_object(sys.argv[1])\n```\nYou can run the script as follows:\n```bash\n$ rosrun dbot_ros track_object_service_call_example.py MyDuck\n```\nAgain, the tracking estimate is published under the topic `/object_tracker_service/object_state`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayesian-object-tracking%2Fdbot_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbayesian-object-tracking%2Fdbot_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbayesian-object-tracking%2Fdbot_ros/lists"}