-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created example with DOPE and DIff-DOPE integration through ROS actinolib. #7
Open
rpapallas
wants to merge
47
commits into
NVlabs:main
Choose a base branch
from
rpapallas:ros-example
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 39 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
3a6d6f2
Created a config file for demo with multi-object with ROS and DOPE
rpapallas 457dc44
Modified Scene dataclass to allow memory image representation
rpapallas 053f252
Updated model paths and added rgb/depth topics.
rpapallas 55e1d0a
Corrected typo
rpapallas 0a465bf
Minor changes to yaml file
rpapallas b361465
Added some HOPE object models as examples.
rpapallas deb545f
Added .mp4 in gitignore
rpapallas e7ccf35
Implemented first version of ROS+DOPE demo with multi-object tracking.
rpapallas e77f4eb
Ignore _build directory in docs
rpapallas 66d318c
Created a new docs page for demos
rpapallas eeea44d
Added URL to the ROS bag.
rpapallas c36572b
Added readme to demos to help people realise that the docs include in…
rpapallas e6fe8f3
Converted the demo into a catkin package
rpapallas 6d08c96
Updated msgs
rpapallas 0b335f3
Implemented first version of actionlib server
rpapallas 40fa711
Implemented a class to support segmentation based on segment-anything
rpapallas 4406f5a
Reformmating based on pre-commit rules
rpapallas 3eb186c
Added some segmentation test images
rpapallas 195f74d
Renamed segmentation class
rpapallas 239bc07
Added script to build and zip website for deployment
rpapallas a699d7f
Updated meshes of HOPE objects.
rpapallas e932625
Implemented actionlib demo
rpapallas aadfe1f
Updated the mesh for bbq sauce
rpapallas ddc0dd7
Updated meshes for other HOPE objects.
rpapallas 3dbd21f
Camera intrinsic params dynamically retrieved from ROS topic.
rpapallas fdffe0e
General refactoring
rpapallas b7bdf99
Updated docs to include instructions of how to run the demo and how t…
rpapallas a9cd963
Updated the roslaunch commands for refine client
rpapallas 463c8cb
Updated model's frame orientation to match DOPE
rpapallas 56a8248
Update demos.rst
rpapallas 494c12c
Minor change.
rpapallas b2e6901
Reverted models back to original format and instead added transformat…
rpapallas fd5c2c4
Minor changes.
rpapallas c709929
Updated models.
rpapallas 51c84cb
Fixed pose output issue
rpapallas 7495914
Merge branch 'ros-example' of github.com:rpapallas/diff-dope into ros…
rpapallas a033fb1
Removed unused libraries.
rpapallas 08d465a
Updated docs.
rpapallas 8520f05
Removed old model of orange_juice and added object textures
rpapallas a3198fc
Added ROS example in README.
rpapallas 48bd007
Moved diffdope_ros to root dir.
rpapallas 4eeeceb
Updated docs to include step to run DOPE.
rpapallas 8aaa647
Made rgb and depth callbacks atomic and not one per object.
rpapallas 6a8f526
Added check to ensure all data available before refining.
rpapallas 13a41fd
Added limit of saved videos per run to avoid saving too many during c…
rpapallas 6c335fe
Implemented continuous tracking and publishing of refined pose to a t…
rpapallas 4b7d46f
Updated docs to include details about continuous tracking launch file
rpapallas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ docs/_buid/ | |
*.png | ||
*.jpg | ||
*.jpeg | ||
*.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
Demos | ||
================ | ||
|
||
Multi-object using ROS and DOPE with RGB and Depth | ||
-------------------------------------------------- | ||
|
||
The demo uses RGB and Depth from a RealSense camera, poses published by DOPE, | ||
and segments the image using | ||
`segment-anything <https://github.com/facebookresearch/segment-anything>`_. | ||
The demo comes as a catkin package under ``examples/``. | ||
|
||
Say you cloned the diff-dope repo under your home directory (i.e., ``~/diff-dope``), | ||
and you have a catkin workspace under your home directory too (i.e., ``~/catkin_ws``), | ||
you can create a symlink of the package there: | ||
|
||
.. code:: | ||
|
||
cd ~/catkin_ws/src | ||
ln -s ~/diff-dope/examples/diffdope_ros . | ||
|
||
You can ``catkin_make`` under ``~/catkin_ws`` now to build the package. | ||
You can, of course, move the package there instead of creating a symlink. | ||
|
||
The demo uses a configuration under | ||
``diffdope_ros/config/multiobject_with_dope.yaml`` which uses DOPE for initial | ||
pose estimation, and dictates topics for RGB and Depth (assuming a RealSense | ||
sensor). It also uses a camera info topic to retrieve camera intrinsic | ||
parameters as well as the image dimensions. | ||
|
||
You can also download a ROS bag from `here <https://leeds365-my.sharepoint.com/:u:/g/personal/scsrp_leeds_ac_uk/Ec-TbyOr1QVIt6NQQP7E4pABkEUmaEGByVjLHugY7Als_A?e=JES96n>`_ | ||
to play with this demo, without the need of a real sensor. | ||
|
||
If you wish to use the ROS bag, you can play it back in a loop like so: | ||
|
||
.. code:: | ||
|
||
rosbag play -l ~/path/to/simple.bag | ||
|
||
|
||
You need to install | ||
`segment-anything <https://github.com/facebookresearch/segment-anything>`_ | ||
and download the weights of the model. | ||
|
||
.. code:: | ||
|
||
pip install git+https://github.com/facebookresearch/segment-anything.git | ||
|
||
Then head to the | ||
`model checkpoints section <https://github.com/facebookresearch/segment-anything?tab=readme-ov-file#model-checkpoints>`_, | ||
and download any of the model checkpoints. Place it somewhere on your | ||
computer and update the ``segment_anything_checkpoint_path`` of the config file | ||
to let it know where to find it. If you want to test the segmentation | ||
functionality independently, you can run the following Python script: | ||
``diffdope_ros/scripts/segmentator.py``. | ||
|
||
From there you can run the demo like so: | ||
|
||
.. code:: | ||
|
||
roslaunch diffdope_ros server.py # To start the actionlib server | ||
|
||
# Refine pose for individual object | ||
roslaunch diffdope_ros refine.launch object_name:=bbq_sauce | ||
roslaunch diffdope_ros refine.launch object_name:=alphabet_soup | ||
roslaunch diffdope_ros refine.launch object_name:=mustard | ||
|
||
# or don't pass object_name to refine the pose of all the objects in the config | ||
roslaunch diffdope_ros refine.launch | ||
|
||
The above names are derived from the config file, ``config/multiobject_with_dope.yaml``. | ||
The launch files pass this file to the server and refine scripts. | ||
|
||
Parameters | ||
************************ | ||
|
||
Please inspect the ``config/multiobject_with_dope.yaml`` file to see certain | ||
parameters. For example, by default this demo will produce videos of the | ||
optimisation, however you can turn this off through the config file | ||
to speed things up. You can also adjust certain optimisation parameters from | ||
the config file. | ||
|
||
Dealing with DOPE and model coordinate frames | ||
************************ | ||
|
||
Please note the following important details when you try to use a new object | ||
and pose from DOPE: | ||
|
||
* DOPE pose output may not match the coordinate frame used in the 3D model of | ||
the object you wish to use. In this case, you need to apply a static | ||
transformation to bring the DOPE pose output to match the one used in your 3D | ||
model. DOPE provides a way in the config file (``model_transforms``) to define such transformation | ||
per object. For more details on this subject, please read `this <https://github.com/NVlabs/Deep_Object_Pose/issues/346>`_. | ||
* The scaling of the object is important. We suggest that you scale your 3D object | ||
in Blender to bring it closer to the scale of the examples. For example, | ||
the HOPE objects as downloaded from the official repository, we had to scale them | ||
by a factor of 10. Although a parameter to scale the 3D object in the config | ||
is available, we had difficulties to get it to work properly and found better | ||
luck by manually scaling the 3D object in Blender. You can import a reference | ||
object (like the BBQ Sauce model we provide) in Blender to see the scale. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider replacing this link with yours, as this link will expire on 5th of May.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do, I am in vacation atm, but I will test this out when I am back.