-
Notifications
You must be signed in to change notification settings - Fork 0
/
camera1Node.py
55 lines (40 loc) · 1.27 KB
/
camera1Node.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import rospy
from sensor_msgs.msg import Image, PointCloud2
'''
Republishes on the Raspberry Pi some of the topics populated by the Jetson Nano.
This enables the external computer to read these topics.
'''
def send_image(msg):
'''
Input:
msg: Image
'''
pub = rospy.Publisher('/camera/raw_image_feed', Image, queue_size=1)
pub.publish(msg)
# def send_left_undistorted(msg):
# '''
# Input:
# msg: Image
# '''
# #print('Image received')
# pub = rospy.Publisher('/camera14/left_undist_image_feed', Image, queue_size=1)
# pub.publish(msg)
# def send_right_undistorted(msg):
# '''
# Input:
# msg: Image
# '''
# pub = rospy.Publisher('camera14/right_undist_image_feed', Image, queue_size=1)
# pub.publish(msg)
# def send_pointcloud(msg):
# '''
# Input:
# msg: PointCloud2
# '''
# #print('pointcloud received')
# pub = rospy.Publisher('/camera1/point_cloud', PointCloud2, queue_size=1)
# pub.publish(msg)
if __name__=='__main__':
rospy.init_node("camera_relay_node", anonymous=True)
rospy.Subscriber("/camera/front", Image, send_image)
rospy.spin()