Comments (5)
Hi Juan,
Thanks for sending the example script. This may be a bug, resulting from some optimization logic. Can you try this updated script and check if the values are updated?
Also, the pose of cameraL
and cameraR
should not change if you only move CameraFrame
, as they are parented to the CameraFrame
, and thus their reported pose should always be relative to the parent. However, if you move them individually, then the pose should change.
from surgical_robotics_challenge.scene import Scene
from surgical_robotics_challenge.camera import Camera
from ambf_client import Client
import rospy
import time
import numpy as np
import tf_conversions.posemath as pm
np.set_printoptions(precision=3, suppress=True, sign=" ")
rospy.init_node("dataset_collection")
c = Client("juanclient")
c.connect()
# Create clients
scene = Scene(c)
ambf_cam_l = Camera(c, "cameraL")
ambf_cam_r = Camera(c, "cameraR")
ambf_cam_frame = Camera(c, "CameraFrame")
#Query camera pose.
counter = 0
flag = True
try:
while flag:
ambf_cam_l.set_pose_changed() # Addition
ambf_cam_frame.set_pose_changed() # Addition
T_FC = pm.toMatrix(ambf_cam_l.get_T_c_w())
T_WF = pm.toMatrix(ambf_cam_frame.get_T_c_w())
print(f"pose at step {counter}")
print(f"camera to frame\n {T_FC}")
print(f"frame to world\n {T_WF}")
print("\n\n\n")
counter += 1
time.sleep(1.5)
if counter > 20:
break
except Exception as e:
print("Exit code")
from surgical_robotics_challenge.
Hi Adnan! Thanks that fixed the issue! Will you be adding the set_pose_changed() call inside the get_T_c_w function? Or should I add the set_pose_changed() to my scripts?
from surgical_robotics_challenge.
Hi Juan, glad that we found what the issue is. I think we should fix it properly rather than requiring to add the set_pose_changed
method. I shall try to create a fix today.
from surgical_robotics_challenge.
Closing this as the above commit should fix the issue.
from surgical_robotics_challenge.
Hi Adnan, just wanted to confirm that the issue was solved!
from surgical_robotics_challenge.
Related Issues (20)
- TypeError: 'tuple' object does not support item assignment in joint_errors_model.py
- project_needle_pts.py script not working and throwing error HOT 3
- Camera frames do not correspond to the docs HOT 8
- Weird oscillations in simulator HOT 5
- Joint errors model HOT 2
- Cannot import surgical robotics challenge modules HOT 2
- The Python control/examples scripts do not terminate cleanly
- Incorrect joint angles being set HOT 17
- Is the image displayed in the simulator rendered?
- ROS package source conflict HOT 2
- Geomagic teleoperation control not working HOT 5
- How to enable gravity compensation for MTM teleoperation control HOT 2
- PSMs don't reach commanded set-points HOT 10
- Unable to grasp needle, proximity not detected HOT 3
- Instruction on running simulation with ROS topic wrappers
- Error running gui_based_control.py HOT 2
- No force feedback using Geomagic & PHANToM Omni (Single Device Configuration)
- Extra offset at PSM Tip for FK and IK compared to the dVRK
- Non blocking move_jp command for PSM arm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surgical_robotics_challenge.