This paper presents a design and experimental study of 3D robotic vision for bin picking and obstacle avoidance. Through the 3D vision algorithm, the robotic picking system is able to analyze the imagery of cluttered objects, classify the objects and estimate the pose of identified objects for grasping. In order to facilitate the robot to work with a human nearby, obstacle avoidance during task execution is developed based on 3D vision. In this design, a RealSense SR300 RGB-D camera is utilized to acquire RGB images and depth images of clustered workpieces. A deep neural network (DNN) approach to object recognition is designed and combined with point cloud segmentation to enhance 3D object-pose estimation for grasping The robot avoids obstacles to assure safe operation during execution of the bin picking task. Practical experiments using a Techman TM5 6-DOF robot arm show that the proposed method effectively accomplishes obstacle avoidance in pick-and-place operations.