Skip to content
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

Ros integration #1

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contact_graspnet/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def inference(global_config, checkpoint_dir, input_paths, K=None, local_regions=
# np.savez('./results/predictions_{}'.format(os.path.basename(p.replace('png','npz').replace('npy','npz'))),
# pred_grasps_cam=pred_grasps_cam, scores=scores, contact_pts=contact_pts)

# Visualize results
# Visualize result
show_image(rgb, segmap)
visualize_grasps(pc_full, pred_grasps_cam, scores, plot_opencv_cam=True, pc_colors=pc_colors)

Expand Down
20 changes: 16 additions & 4 deletions env_cgnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- ca-certificates=2023.5.7=hbcca054_0
- catkin_pkg=0.5.2=pyhd8ed1ab_0
- cudatoolkit=11.2.2=hbe64b41_10
- cudnn=8.2.1.32=h86fa8c9_0
- distro=1.8.0=pyhd8ed1ab_0
- docutils=0.20.1=py38h578d9bd_0
- empy=3.3.4=pyh9f0ad1d_1
- ld_impl_linux-64=2.38=h1181459_1
- libffi=3.4.4=h6a678d5_0
- libgcc-ng=11.2.0=h1234567_1
Expand All @@ -16,13 +20,19 @@ dependencies:
- ncurses=6.4=h6a678d5_0
- openssl=1.1.1t=h7f8727e_0
- pip=23.0.1=py38h06a4308_0
- pyparsing=3.0.9=pyhd8ed1ab_0
- python=3.8.16=h7a1cb2a_3
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python_abi=3.8=2_cp38
- pyyaml=6.0=py38h0a891b7_4
- readline=8.2=h5eee18b_0
- rospkg=1.5.0=pyhd8ed1ab_0
- setuptools=67.8.0=py38h06a4308_0
- sqlite=3.41.2=h5eee18b_0
- tk=8.6.12=h1ccaba5_0
- wheel=0.38.4=py38h06a4308_0
- xz=5.4.2=h5eee18b_0
- yaml=0.2.5=h7f98852_2
- zlib=1.2.13=h5eee18b_0
- pip:
- absl-py==0.15.0
Expand All @@ -31,6 +41,7 @@ dependencies:
- cachetools==5.3.1
- certifi==2023.5.7
- charset-normalizer==3.1.0
- click==8.1.3
- configobj==5.0.8
- contourpy==1.0.7
- cycler==0.11.0
Expand All @@ -55,26 +66,26 @@ dependencies:
- markupsafe==2.1.3
- matplotlib==3.6.0
- mayavi==4.8.1
- mypy-extensions==1.0.0
- numpy==1.19.5
- oauthlib==3.2.2
- opencv-python-headless==4.7.0.72
- opt-einsum==3.3.0
- packaging==23.1
- pathspec==0.11.1
- pillow==9.5.0
- platformdirs==3.5.1
- protobuf==3.20.3
- pyasn1==0.5.0
- pyasn1-modules==0.3.0
- pyface==8.0.0
- pyglet==2.0.7
- pygments==2.15.1
- pyopengl==3.1.0
- pyparsing==3.0.9
- pyqt5==5.15.9
- pyqt5-qt5==5.15.2
- pyqt5-sip==12.12.1
- pyrender==0.1.45
- python-dateutil==2.8.2
- pyyaml==6.0
- requests==2.31.0
- requests-oauthlib==1.3.1
- rsa==4.9
Expand All @@ -87,11 +98,12 @@ dependencies:
- tensorflow-estimator==2.5.0
- tensorflow-gpu==2.5.0
- termcolor==1.1.0
- tomli==2.0.1
- tqdm==4.65.0
- traits==6.4.1
- traitsui==8.0.0
- trimesh==3.21.7
- typing-extensions==3.7.4.3
- typing-extensions==3.7.4
- urllib3==1.26.16
- vtk==9.2.6
- werkzeug==2.3.4
Expand Down
148 changes: 144 additions & 4 deletions env_cgnet_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,83 @@
absl-py==0.15.0
actionlib==1.14.0
angles==1.9.13
apptools==5.2.0
astunparse==1.6.3
base_local_planner==1.17.3
bondpy==1.8.6
cachetools==5.3.1
camera-calibration==1.17.0
camera-calibration-parsers==1.12.0
catkin==0.8.10
catkin-pkg @ file:///home/conda/feedstock_root/build_artifacts/catkin_pkg_1653705059873/work
certifi==2023.5.7
charset-normalizer==3.1.0
click==8.1.3
cmake==3.26.1
configobj==5.0.8
contourpy==1.0.7
controller-manager==0.19.6
controller-manager-msgs==0.19.6
cv-bridge==1.16.2
cycler==0.11.0
diagnostic-analysis==1.11.0
diagnostic-common-diagnostics==1.11.0
diagnostic-updater==1.11.0
distro @ file:///home/conda/feedstock_root/build_artifacts/distro_1675116244235/work
docutils @ file:///home/conda/feedstock_root/build_artifacts/docutils_1684324183617/work
drone-wrapper==1.4.2
dynamic-reconfigure==1.7.3
dynamixel_sdk==3.7.51
easydict==1.10
empy==3.3.4
envisage==7.0.3
filterpy==1.4.5
flatbuffers==1.12
fonttools==4.39.4
freetype-py==2.4.0
gast==0.4.0
gazebo_plugins==2.9.2
gazebo_ros==2.9.2
gazebo_video_monitor_utils==0.7.0
gencpp==0.7.0
geneus==3.0.0
genlisp==0.4.18
genmsg==0.6.0
gennodejs==2.0.2
genpy==0.6.15
google-auth==2.19.1
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.34.1
h5py==3.1.0
idna==3.4
image-geometry==1.16.2
imageio==2.30.0
importlib-metadata==6.6.0
importlib-resources==5.12.0
interactive-markers==1.12.0
joint-state-publisher==1.15.1
joint-state-publisher-gui==1.15.1
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
kiwisolver==1.4.4
laser_geometry==1.6.7
lit==16.0.0
llvmlite==0.39.1
Markdown==3.4.3
MarkupSafe==2.1.3
matplotlib==3.6.0
mavros==1.15.0
mayavi==4.8.1
message-filters==1.16.0
moveit-commander==1.1.11
moveit-core==1.1.11
moveit-python==0.4.5
moveit-ros-planning-interface==1.1.11
moveit-ros-visualization==1.1.11
moveit-task-constructor-core==0.1.3
mpmath==1.3.0
mypy-extensions==1.0.0
networkx==3.0
numba==0.56.4
numpy==1.19.5
Expand All @@ -52,28 +96,109 @@ opencv-python==4.2.0.34
opencv-python-headless==4.7.0.72
opt-einsum==3.3.0
packaging==23.1
pathspec==0.11.1
Pillow==9.5.0
platformdirs==3.5.1
pr2_power_board==1.1.10
progressbar2==4.2.0
protobuf==3.20.3
py-trees==0.7.6
pyasn1==0.5.0
pyasn1-modules==0.3.0
pyface==8.0.0
pyglet==2.0.7
Pygments==2.15.1
PyOpenGL==3.1.0
pyparsing==3.0.9
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1652235407899/work
PyQt5==5.15.9
PyQt5-Qt5==5.15.2
PyQt5-sip==12.12.1
pyrender==0.1.45
python-dateutil==2.8.2
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
python-qt-binding==0.4.4
python-utils==3.5.2
PyYAML==6.0
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1648757091578/work
qt-dotgraph==0.4.2
qt-gui==0.4.2
qt-gui-cpp==0.4.2
qt-gui-py-common==0.4.2
requests==2.31.0
requests-oauthlib==1.3.1
resource_retriever==1.12.7
ros_numpy==0.0.5
rosbag==1.16.0
rosboost-cfg==1.15.8
rosclean==1.15.8
roscreate==1.15.8
rosgraph==1.16.0
roslaunch==1.16.0
roslib==1.15.8
roslint==0.12.0
roslz4==1.16.0
rosmake==1.15.8
rosmaster==1.16.0
rosmsg==1.16.0
rosnode==1.16.0
rosparam==1.16.0
rospkg @ file:///home/conda/feedstock_root/build_artifacts/rospkg_1679367642027/work
rospy==1.16.0
rosserial_arduino==0.9.2
rosserial_client==0.9.2
rosserial_python==0.9.2
rosservice==1.16.0
rostest==1.16.0
rostopic==1.16.0
rosunit==1.15.8
roswtf==1.16.0
rqt-controller-manager==0.19.6
rqt-drone-teleop==1.4.2
rqt-ez-publisher==0.6.1
rqt-ground-robot-teleop==1.4.2
rqt-image-view==0.4.17
rqt-moveit==0.5.10
rqt-multiplot==0.0.12
rqt-reconfigure==0.5.5
rqt-robot-dashboard==0.5.8
rqt-robot-monitor==0.5.14
rqt-rviz==0.7.0
rqt_action==0.4.9
rqt_bag==0.5.1
rqt_bag_plugins==0.5.1
rqt_console==0.4.11
rqt_dep==0.4.12
rqt_graph==0.4.14
rqt_gui==0.5.3
rqt_gui_py==0.5.3
rqt_joint_trajectory_controller==0.21.1
rqt_launch==0.4.9
rqt_logger_level==0.4.11
rqt_msg==0.4.10
rqt_nav_view==0.5.7
rqt_plot==0.4.13
rqt_pose_view==0.5.11
rqt_pr2_dashboard==0.4.0
rqt_publisher==0.4.10
rqt_py_common==0.5.3
rqt_py_console==0.4.10
rqt_py_trees==0.4.1
rqt_robot_steering==0.5.12
rqt_runtime_monitor==0.5.9
rqt_service_caller==0.4.10
rqt_shell==0.4.11
rqt_srv==0.4.9
rqt_tf_tree==0.6.3
rqt_top==0.4.10
rqt_topic==0.4.13
rqt_web==0.4.10
rsa==4.9
rviz==1.14.20
scipy==1.10.1
sensor-msgs==1.13.1
six==1.15.0
smach==2.5.1
smach-ros==2.5.1
smclib==1.8.6
srdfdom==0.6.3
sympy==1.11.1
tensorboard==2.11.2
tensorboard-data-server==0.6.1
Expand All @@ -82,16 +207,31 @@ tensorflow==2.5.0
tensorflow-estimator==2.5.0
tensorflow-gpu==2.5.0
termcolor==1.1.0
tf==1.13.2
tf-conversions==1.13.2
tf2-geometry-msgs==0.7.6
tf2-kdl==0.7.6
tf2-py==0.7.6
tf2-ros==0.7.6
tf2-sensor-msgs==0.7.6
tomli==2.0.1
topic-tools==1.16.0
torchaudio==2.0.1
tqdm==4.65.0
trac_ik_python==1.6.6
traits==6.4.1
traitsui==8.0.0
transforms3d==0.4.1
trimesh==3.21.7
triton==2.0.0
typing-extensions==3.7.4.3
turtlebot3_example==1.2.5
turtlebot3_teleop==1.2.5
typing-extensions==3.7.4
unique_id==1.0.6
urdfdom-py==0.4.6
urllib3==1.26.16
vtk==9.2.6
Werkzeug==2.3.4
wrapt==1.12.1
xacro==1.14.15
zipp==3.15.0
14 changes: 14 additions & 0 deletions ros/_init_paths.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Set up paths for Model"""

import os.path as osp
import sys

def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)

this_dir = osp.dirname(__file__)

# Add lib to PYTHONPATH
lib_path = osp.join(this_dir, '../contact_graspnet')
add_path(lib_path)
Loading