Homagni Saha

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Homagni Saha

  • Rank
    Newbie

Robot Information

  • Company Name
    Iowa State University

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Homagni Saha

    Getting images from both cameras in sawyer

    Hello, I was recently trying to follow along the code for displaying two camera images from the sawyer one-handed robot. Here: http://sdk.rethinkrobotics.com/intera/Camera_Image_Display_Example Now the camera interface in sawyer does not allow to have two cameras on, but I need it !, so I did : (after installing sawyer gazebo from here :http://sdk.rethinkrobotics.com/intera/Gazebo_Tutorial) import argparse import numpy as np import cv2 from cv_bridge import CvBridge, CvBridgeError import rospy import intera_interface from sensor_msgs.msg import Image import message_filters def img_callback(image_hand,image_head): bridge1 = CvBridge() bridge2 = CvBridge() try: cv_image1 = bridge1.imgmsg_to_cv2(image_hand, "mono8") except CvBridgeError as e: print(e) cv2.imshow("Hand Image window", cv_image1) cur_image_hand=cv2.resize(cv_image1, (80, 80)) cv2.waitKey(3) try: cv_image2 = bridge2.imgmsg_to_cv2(image_head, "bgr8") except CvBridgeError as e: print(e) cv2.imshow("Head Image window", cv_image2) gray_image = cv2.cvtColor(cv_image2, cv2.COLOR_BGR2GRAY) cur_image_head=cv2.resize(gray_image, (80, 80)) #rospy.spin() cv2.waitKey(3) def main(): rospy.init_node('image_converter', anonymous=True) image_sub_hand = message_filters.Subscriber("/io/internal_camera/right_hand_camera/image_rect",Image) image_sub_head = message_filters.Subscriber("/io/internal_camera/head_camera/image_rect_color",Image) #ts = message_filters.TimeSynchronizer([self.image_sub_hand, self.image_sub_head], 10) ts = message_filters.TimeSynchronizer([image_sub_hand, image_sub_head], 10) ts.registerCallback(img_callback) rospy.spin() if __name__ == '__main__': main() This code starts with both the images showing nicely together in two seperate windows for a few seconds, but after that both the cv windows blacken out and images are not updated anymore . Please suggest what to do, and provide me the best solution that allows me to access these two topics at any time using python code.
  2. Homagni Saha

    rosrun commands not running

    Hello, After starting the sawyer robot today I see that I cannot run anu rosrun intera examples on the robot. Here is an example homagni@homagnisaha:~/ros_sawyer$ rosrun intera_interface robot_enable.py [rosrun] Couldn't find executable named robot_enable.py below /home/homagni/ros_sawyer/src/intera_sdk/intera_interface [rosrun] Found the following, but they're either not files, [rosrun] or not executable: [rosrun] /home/homagni/ros_sawyer/src/intera_sdk/intera_interface/src/intera_interface/robot_enable.py homagni@homagnisaha:~/ros_sawyer$ rosrun intera_examples recorder.py -f move1 [rosrun] Couldn't find executable named recorder.py below /home/homagni/ros_sawyer/src/intera_sdk/intera_examples [rosrun] Found the following, but they're either not files, [rosrun] or not executable: [rosrun] /home/homagni/ros_sawyer/src/intera_sdk/intera_examples/src/intera_examples/recorder.py I tried to create an executable by doing chmod +x recorder.py but still it doesnt work. Any help?