-
Notifications
You must be signed in to change notification settings - Fork 134
WIP Visualization using Foxglove #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
storm-light
wants to merge
49
commits into
erdos-project:master
Choose a base branch
from
storm-light:pylot-ros
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
ef49d55
added ROSCameraPublisher.py and visualizer operator can publish camer…
storm-light a4f092b
minimal name changes
storm-light a7ecf65
fixed variable typo
storm-light 44ff205
visualizer operator can now publish ROS PointCloud2 messages (display…
storm-light 83c3b98
fixed mirror image for lidar
storm-light cd44d2c
visualizer operator can visualize segmentation frames and depth frame…
storm-light 8155d82
visualizes planning world
storm-light bf5a24d
streams can be displayed simultaneously (in foxglove), still has pyga…
storm-light ccce977
removed all dependencies on pygame in visualizer_operator, though sti…
storm-light 22a3900
removed run_visualizer_control_loop
storm-light a7b36ce
removed visualize() methods from camera_frame.py, depth_frame.py, poi…
storm-light 87b3a53
renamed ROSCameraPublisher.py to ros_camera_publisher.py and ROSLIDAR…
storm-light 03e9752
added updated dockerfile (WIP) to install foxglove and ROS
storm-light dd73dfc
[Bug] Ensure localization sends a pose even if it is innacurate.
ICGog c8fa7b2
Support arbitrary traffic manager ports (#202)
pschafhalter 1518c0a
[Bug] Ensure that the obstacle and TL bbox loggers do not overwrite b…
ICGog efa9333
removed pygame depedencies from operator_creator.py
storm-light 88dc197
minor comment syntax fix
storm-light 7227e58
minor comment syntax fix
storm-light ba82d01
changed import statements to include full path
storm-light 051f1a8
added docstrings to ROSCameraPublisher and ROSLIDARPublisher classes …
storm-light 2ad7843
resolved import merge conflict
storm-light ba218ef
minor comment changes
storm-light fdba024
Added QDTrack object tracker (#183)
mageofboy a24ed70
yapf'd deez files
storm-light 13b6356
added ROSCameraPublisher.py and visualizer operator can publish camer…
storm-light 204d60c
minimal name changes
storm-light 5f77390
fixed variable typo
storm-light 0b50b99
visualizer operator can now publish ROS PointCloud2 messages (display…
storm-light 10288a5
fixed mirror image for lidar
storm-light c3d0913
visualizer operator can visualize segmentation frames and depth frame…
storm-light 630b943
visualizes planning world
storm-light b3b0aab
streams can be displayed simultaneously (in foxglove), still has pyga…
storm-light 389092b
removed all dependencies on pygame in visualizer_operator, though sti…
storm-light 85cdf73
removed run_visualizer_control_loop
storm-light 7702c64
removed visualize() methods from camera_frame.py, depth_frame.py, poi…
storm-light 0fd5ad4
renamed ROSCameraPublisher.py to ros_camera_publisher.py and ROSLIDAR…
storm-light 56590a5
added updated dockerfile (WIP) to install foxglove and ROS
storm-light 2206c71
removed pygame depedencies from operator_creator.py
storm-light 8101483
added docstrings to ROSCameraPublisher and ROSLIDARPublisher classes …
storm-light 4b5cab5
minor comment syntax fix
storm-light af7fac5
minor comment syntax fix
storm-light 08f945e
changed import statements to include full path
storm-light 9aebae6
minor comment changes
storm-light 2074851
yapf'd deez files
storm-light 9d50b79
Merge remote-tracking branch 'origin/pylot-ros' into pylot-ros
storm-light 053cdab
removed extra import statements
storm-light 72ecd9a
runs roscore from visualizer operator's init() and kills process in d…
storm-light 45436d7
updated Dockerfile to correctly install foxglove and ros
storm-light File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
*.log | ||
*.csv | ||
*.ipynb | ||
*.dot | ||
dependencies/ | ||
pylot/prediction/prediction/ | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import sys | ||
import rospy | ||
import numpy as np | ||
from sensor_msgs.msg import Image | ||
|
||
|
||
class ROSCameraPublisher: | ||
"""Class that stores a ROS publisher node that publishes ROS Image messages | ||
|
||
Args: | ||
topic: the name of the topic published to | ||
|
||
Attributes: | ||
image_pub: ROS publisher node | ||
""" | ||
def __init__(self, topic: str): | ||
self.image_pub = rospy.Publisher(topic, Image, queue_size=10) | ||
|
||
def publish(self, img_arr): | ||
"""Publishes a sensor_msgs/Image message (constructed from input) | ||
|
||
Args: | ||
img_arr: A numpy array storing a frame (e.g. camera, depth, etc.) | ||
""" | ||
img_msg = Image(encoding='rgb8') | ||
if type(img_arr[0][0][0]) != np.int8: | ||
img_arr = img_arr.astype(np.int8) | ||
img_msg.height, img_msg.width, channels = img_arr.shape | ||
img_msg.data = img_arr.tobytes() | ||
img_msg.step = img_msg.width * img_msg.height | ||
img_msg.is_bigendian = (img_arr.dtype.byteorder == '>' | ||
or img_arr.dtype.byteorder == '=' | ||
and sys.byteorder == 'big') | ||
self.image_pub.publish(img_msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import sys | ||
import rospy | ||
import numpy as np | ||
from sensor_msgs.msg import PointCloud2, PointField | ||
|
||
|
||
class ROSLIDARPublisher: | ||
storm-light marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"""Class that stores a ROS publisher node that publishes ROS Point Cloud messages | ||
|
||
Args: | ||
topic: the name of the topic published to | ||
|
||
Attributes: | ||
point_cloud_pub: ROS publisher node | ||
""" | ||
def __init__(self, topic: str): | ||
self.point_cloud_pub = rospy.Publisher(topic, | ||
PointCloud2, | ||
queue_size=10) | ||
|
||
def publish(self, points): | ||
"""Publishes a sensor_msgs/PointCloud2 message (constructed from input) | ||
|
||
Args: | ||
points: A numpy array storing a point cloud (see pylot.pylot.perception.point_cloud) | ||
""" | ||
|
||
points = points.astype(np.float32) | ||
points_byte_array = points.tobytes() | ||
row_step = len(points_byte_array) | ||
point_step = len(points[0].tobytes()) | ||
fields = [ | ||
PointField('x', 0, PointField.FLOAT32, 1), | ||
PointField('y', 4, PointField.FLOAT32, 1), | ||
PointField('z', 8, PointField.FLOAT32, 1) | ||
] | ||
point_cloud_msg = PointCloud2(height=1, | ||
width=len(points), | ||
is_dense=True, | ||
is_bigendian=False, | ||
fields=fields, | ||
point_step=point_step, | ||
row_step=row_step, | ||
data=points_byte_array) | ||
self.point_cloud_pub.publish(point_cloud_msg) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.