Compare commits
11 Commits
master
...
67108c45aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67108c45aa | ||
|
|
4f14636768 | ||
|
|
f5d37a5f11 | ||
|
|
d58cd68b8f | ||
|
|
80f1ece25a | ||
|
|
0ed8cd4ee1 | ||
|
|
aabf72c149 | ||
|
|
b281a5caed | ||
|
|
5aad39b7ba | ||
|
|
bda7453e51 | ||
|
|
231f5fc815 |
18
.vscode/tasks.json
vendored
Normal file
18
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "shell",
|
||||
"command": "catkin",
|
||||
"args": [
|
||||
"build",
|
||||
"-DPYTHON_EXECUTABLE=/home/da/miniconda3/envs/gsmini/bin/python",
|
||||
//"-DPYTHON_EXECUTABLE=${HOME}/.conda/envs/gsmini/bin/python"
|
||||
],
|
||||
"problemMatcher": [
|
||||
"$catkin-gcc"
|
||||
],
|
||||
"group": "build",
|
||||
"label": "catkin: build"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /home/wxchen/.conda/envs/gsmini/bin/python
|
||||
#! /home/da/miniconda3/envs/gsmini/bin/python
|
||||
|
||||
import numpy as np
|
||||
import cv2 as cv
|
||||
@@ -130,7 +130,6 @@ def box_callback(box, depth, color_info):
|
||||
# normal = calculate_image_edge_plane_normal(annulus_roi)
|
||||
# print(normal)
|
||||
|
||||
|
||||
# normal vector to quaternion
|
||||
screw_quat = tf.transformations.quaternion_from_euler(0, 0, 0)
|
||||
screw_quat[0] = normal_q[0]
|
||||
@@ -158,10 +157,10 @@ def box_callback(box, depth, color_info):
|
||||
screw_tf.transform.translation.x = x
|
||||
screw_tf.transform.translation.y = y
|
||||
screw_tf.transform.translation.z = z
|
||||
screw_tf.transform.rotation.x = screw_quat_filtered[0]
|
||||
screw_tf.transform.rotation.y = screw_quat_filtered[1]
|
||||
screw_tf.transform.rotation.z = screw_quat_filtered[2]
|
||||
screw_tf.transform.rotation.w = screw_quat_filtered[3]
|
||||
screw_tf.transform.rotation.x = screw_quat[0]
|
||||
screw_tf.transform.rotation.y = screw_quat[1]
|
||||
screw_tf.transform.rotation.z = screw_quat[2]
|
||||
screw_tf.transform.rotation.w = screw_quat[3]
|
||||
|
||||
tf_broadcaster.sendTransform(screw_tf)
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user