Skip to content

Visualization package #196

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

Merged
merged 245 commits into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
1957796
Directory changes
LaurieCheers-unity Feb 2, 2021
556cd71
Merge back
LaurieCheers-unity Feb 2, 2021
d17ab9b
Merge fix
LaurieCheers-unity Feb 2, 2021
5b6fb16
Merge more
LaurieCheers-unity Feb 2, 2021
f42296d
Merge more
LaurieCheers-unity Feb 2, 2021
406b248
Merge
LaurieCheers-unity Feb 2, 2021
0254dc4
Making it compile
LaurieCheers-unity Feb 2, 2021
b53cf29
Remove dead file
LaurieCheers-unity Feb 2, 2021
b509557
Visualizer doc
LaurieCheers-unity Feb 3, 2021
0b7ddbf
RosMessageGeneration namespace change
LaurieCheers-unity Feb 3, 2021
d7b1b12
Merge branch 'laurie/RosMessageGenerationNamespaceChange' into laurie…
LaurieCheers-unity Feb 3, 2021
955dbc0
Reworking the API - I think this works well
LaurieCheers-unity Feb 4, 2021
b96d0bf
More cleanup & docs
LaurieCheers-unity Feb 8, 2021
42edcac
Line endings & format
LaurieCheers-unity Feb 8, 2021
05f96f4
Namespace
LaurieCheers-unity Feb 8, 2021
48c9b80
Merge branch 'dev' into laurie/VisualizersMerge2
LaurieCheers-unity Feb 8, 2021
ac3dbb6
Line endings, namespaces
LaurieCheers-unity Feb 8, 2021
ad7b675
Doc tweaks
LaurieCheers-unity Feb 8, 2021
72018ce
Decided I don't like this function
LaurieCheers-unity Feb 9, 2021
9ce7aab
Default Visualizer calls Message.ToString only as needed
LaurieCheers-unity Feb 9, 2021
38e7f06
Topic -> metadata
LaurieCheers-unity Feb 9, 2021
d277ab9
Metadata => struct
LaurieCheers-unity Feb 9, 2021
4f92356
Better punctuation
LaurieCheers-unity Feb 9, 2021
11a9eaf
PR feedback
LaurieCheers-unity Feb 10, 2021
342c61b
More error checking, removed PrivateMethods subclass
LaurieCheers-unity Feb 10, 2021
4e6fcf6
Merge branch 'dev' into laurie/VisualizersMerge2
LaurieCheers-unity Feb 10, 2021
a8bde71
Visualizers 2.0
LaurieCheers-unity Feb 22, 2021
907482b
Merge branch 'dev' into laurie/VisualizersMerge2
LaurieCheers-unity Feb 22, 2021
f68411a
Adjustable priority
LaurieCheers-unity Feb 22, 2021
0fc9ebe
Auto-fix fully transparent colors
LaurieCheers-unity Feb 22, 2021
634aeb2
Docs
LaurieCheers-unity Feb 23, 2021
b06dd14
Priority is a separate property the default visualizers support
LaurieCheers-unity Feb 23, 2021
17a3a91
Renamed VisualizerWithDrawing
LaurieCheers-unity Feb 23, 2021
0aec092
Better error messages
LaurieCheers-unity Feb 23, 2021
c36bace
Rearranging stuff ready for more visualizers
LaurieCheers-unity Feb 24, 2021
55aecc9
Coding standards
LaurieCheers-unity Feb 24, 2021
df2980d
Coding standards
LaurieCheers-unity Feb 24, 2021
680a1e2
PointStamped - doing it the obvious "dumb" way works best.
LaurieCheers-unity Feb 24, 2021
d956941
Merge branch 'laurie/VisualizersMerge2' into laurie/MoreVisualizers
LaurieCheers-unity Feb 24, 2021
ed5a4d8
More stamped messages
LaurieCheers-unity Feb 24, 2021
6d62c0f
M prefix for all messages
LaurieCheers-unity Feb 24, 2021
1eefdf8
Merge branch 'laurie/MPrefix' into laurie/VisualizersMerge2
LaurieCheers-unity Feb 24, 2021
6411c0e
Fixup after merging MPrefix
LaurieCheers-unity Feb 24, 2021
10f6f1b
Merge branch 'laurie/VisualizersMerge2' into laurie/MoreVisualizers
LaurieCheers-unity Feb 24, 2021
94d7ad8
Fixup with M prefix
LaurieCheers-unity Feb 24, 2021
975acf2
More stamped messages
LaurieCheers-unity Feb 25, 2021
35fa84e
DebugDraw.DrawMesh
LaurieCheers-unity Feb 25, 2021
0463226
Alpha materials
LaurieCheers-unity Feb 25, 2021
4c8abd6
Restructured visualization into its own package
LaurieCheers-unity Feb 26, 2021
14c4968
Clean up metafile
LaurieCheers-unity Feb 26, 2021
b2ae73c
Clean up new package
LaurieCheers-unity Feb 26, 2021
101efb9
Compiles
LaurieCheers-unity Feb 26, 2021
8fe4aa4
Renamed to MessageVisualizationS
LaurieCheers-unity Feb 26, 2021
e290af7
Renamed folder to message-visualizations
LaurieCheers-unity Feb 26, 2021
dccb93d
Simple visualizer for joint paths
LaurieCheers-unity Feb 26, 2021
704a54f
RobotVisualization becomes more of a real visualization component
LaurieCheers-unity Feb 26, 2021
33c25e0
Compiles
LaurieCheers-unity Feb 26, 2021
9cabc57
Compiles
LaurieCheers-unity Feb 26, 2021
86dcf43
Ghosts
LaurieCheers-unity Feb 26, 2021
d1c1235
Ghost fix
LaurieCheers-unity Feb 26, 2021
eeea3a7
DrawJointPaths with JointPlacements
LaurieCheers-unity Feb 26, 2021
ea83817
Clean up supplemental list on clear
LaurieCheers-unity Feb 26, 2021
b3e7f9d
Coding standards
LaurieCheers-unity Feb 27, 2021
a60263c
In arguments to Draw, put the Drawing first
LaurieCheers-unity Feb 27, 2021
62097a4
Remove label in hud
LaurieCheers-unity Feb 27, 2021
407c9e3
Pose visualizers
LaurieCheers-unity Feb 27, 2021
5e272ab
Laurie/standards pass (#68)
LaurieCheers-unity Mar 1, 2021
3e18f4a
The remaining pose visualizers
LaurieCheers-unity Mar 1, 2021
a3f1671
MessageVisualizations.Draw and GUI methods are now extension methods
LaurieCheers-unity Mar 2, 2021
a649ea5
Format + line endings
LaurieCheers-unity Mar 2, 2021
38a01ba
Acceleration visualizers
LaurieCheers-unity Mar 3, 2021
16944c5
Rotation >360 degrees is drawn as a spiral
LaurieCheers-unity Mar 3, 2021
0e829e7
New visualizer GUIs
LaurieCheers-unity Mar 5, 2021
95145d6
Custom GUI layout
LaurieCheers-unity Mar 11, 2021
7dbb11e
Revisions from feedback: filter topics, axis lines are ROS axes by de…
LaurieCheers-unity Mar 12, 2021
71850b6
Merge branch 'dev' into laurie/CustomGUILayout
LaurieCheers-unity Mar 12, 2021
dc522a5
Adding pick and place visualization tutorial
LaurieCheers-unity Mar 12, 2021
0c6cd69
Merge branch 'dev' into laurie/CustomGUILayout
LaurieCheers-unity Mar 12, 2021
ab5d739
Pick and place visualizer
LaurieCheers-unity Mar 12, 2021
ea0e8f5
Renamed example script
LaurieCheers-unity Mar 12, 2021
6190ff2
More example files
LaurieCheers-unity Mar 12, 2021
55a966f
Merge branch 'laurie/VisualizationPackage' into laurie/CustomGUILayout
LaurieCheers-unity Mar 12, 2021
1b2d7c0
Coding standards
LaurieCheers-unity Mar 12, 2021
25911f5
Coding standards
LaurieCheers-unity Mar 12, 2021
d2cd4ff
Merge branch 'dev' into laurie/VisualizationPackage
LaurieCheers-unity Mar 12, 2021
09de313
Merge branch 'laurie/VisualizationPackage' into laurie/CustomGUILayout
LaurieCheers-unity Mar 12, 2021
04de34d
Merge fixes
LaurieCheers-unity Mar 15, 2021
ac3bf07
DebugDraw.Drawing -> BasicDrawing
LaurieCheers-unity Mar 15, 2021
9cb37d6
Dynamically subscribing to messages in the HUD
LaurieCheers-unity Mar 17, 2021
d05187e
All shape messages(?)
LaurieCheers-unity Mar 17, 2021
934deb6
SolidPrimitive GUI
LaurieCheers-unity Mar 17, 2021
d0cd570
Draw Plane
LaurieCheers-unity Mar 18, 2021
e0d680d
Simple path drawer
LaurieCheers-unity Mar 18, 2021
8b204f5
Format document, line endings
LaurieCheers-unity Mar 18, 2021
e785985
Point clouds - first commit
LaurieCheers-unity Mar 29, 2021
a09a05d
Point cloud - added additive version
LaurieCheers-unity Mar 30, 2021
168bd3a
Point Clouds - dynamic radius
LaurieCheers-unity Mar 30, 2021
4e29b7c
Additive
LaurieCheers-unity Mar 30, 2021
7ae8a51
MColorRGBA fields are from 0 to 1
LaurieCheers-unity Mar 30, 2021
c04d390
Renamed
LaurieCheers-unity Mar 30, 2021
be9046f
Initial commit: Illuminance, FluidPressure, Humidity, Temperature
at669 Mar 31, 2021
20f6a38
Visualizer_msg visualizer
LaurieCheers-unity Mar 31, 2021
0a65a3c
Sensors: initial CompressedImage, Image
at669 Mar 31, 2021
5dee2af
CompressedImage, Image visualizers base
at669 Apr 2, 2021
5bbab04
Image extensions, initial Joy commit
at669 Apr 5, 2021
27ee743
Initial commits battery, time reference, Joy configurations
at669 Apr 6, 2021
4607d7d
Initial commit JoyFeedback, JoyFeedbackArray
at669 Apr 6, 2021
b252916
TF Monitoring
LaurieCheers-unity Apr 7, 2021
5802111
Updated to latest KeepIncomingConnection changes
LaurieCheers-unity Apr 7, 2021
8caa079
Image fixes, NavSatFix, NavSatStatus, Range, RegionOfInterest
at669 Apr 7, 2021
f05e2fc
Stop the connection on leaving play mode
LaurieCheers-unity Apr 7, 2021
0566440
Range, Joy, Image, IMU modifications
at669 Apr 8, 2021
451238c
Initial commit CameraInfo, ROI fixes
at669 Apr 8, 2021
bb3c5df
Bayer image encoding support, range fixes
at669 Apr 9, 2021
4503d56
IMU drawing, Range fixes
at669 Apr 12, 2021
e4bc0e0
Added an accessor to get RosMessageName from any message
LaurieCheers-unity Apr 13, 2021
a9dcc2b
Refining how topic visualizations are set up and saved
LaurieCheers-unity Apr 13, 2021
b12fbd8
PointCloud2 initial commit
at669 Apr 14, 2021
4189d79
TF visualizer
LaurieCheers-unity Apr 15, 2021
842e891
Clean up and polish
LaurieCheers-unity Apr 15, 2021
ed85b27
Clean up
LaurieCheers-unity Apr 15, 2021
484e13d
Minor sensors fixes
at669 Apr 15, 2021
3ea01b7
Merge branch 'laurie/TFMonitoring' into amanda/visualize_sensor_msgs
at669 Apr 15, 2021
50a53f4
Optimization: reuse the previous drawing for the same visualizer
LaurieCheers-unity Apr 15, 2021
3eef217
Merge branch 'laurie/TFMonitoring' into amanda/visualize_sensor_msgs
at669 Apr 15, 2021
1f3fd94
TF list in hierarchy order
LaurieCheers-unity Apr 15, 2021
bf37ade
Range edits, MultiEchoLaserScan initial commit
at669 Apr 15, 2021
e44af11
Merge branch 'laurie/TFMonitoring' into amanda/visualize_sensor_msgs
at669 Apr 15, 2021
58f2b30
Reorganization; MJointState to RobotVisualization
at669 Apr 16, 2021
5e429ee
MultiDOFJointState initial RobotVisualization commit
at669 Apr 16, 2021
8004ae0
RosConnection 2.0
LaurieCheers-unity Apr 19, 2021
bdd88e4
RGB, size for PointCloud2
at669 Apr 19, 2021
43847c2
Updated configs for PCL2
at669 Apr 20, 2021
f2d48e5
PCL2 configs with dropdown
at669 Apr 20, 2021
e3dcdb2
PCL2 Scriptable Object configs
at669 Apr 21, 2021
812dcbf
Better read logic
LaurieCheers-unity Apr 21, 2021
ff02f27
Basic connection works, hanndles disconnect gracefully-ish
LaurieCheers-unity Apr 23, 2021
1c6f184
PCL, PCL2, MultiEchoLaserScan ScriptableObjects
at669 Apr 23, 2021
98c34a1
Services!
LaurieCheers-unity Apr 26, 2021
f06ca91
Cleanup unnecessary fields
LaurieCheers-unity Apr 27, 2021
7524cc7
Merge branch 'dev' into laurie/RosConnection2.0
LaurieCheers-unity Apr 27, 2021
c47404a
Coding standards
LaurieCheers-unity Apr 27, 2021
b434149
Merge branch 'laurie/RosConnection2.0' of https://github.com/Unity-Te…
LaurieCheers-unity Apr 27, 2021
2c3bc9d
Updates for coding standards
LaurieCheers-unity Apr 27, 2021
58ac514
Fix hudpanel
LaurieCheers-unity Apr 27, 2021
6d7da70
Coding standards
LaurieCheers-unity Apr 27, 2021
f4e3f4b
Merge branch 'dev' into laurie/TFMonitoring
LaurieCheers-unity Apr 28, 2021
ff131fb
Merge branch 'laurie/RosConnection2.0' into laurie/TFMonitoring
LaurieCheers-unity Apr 28, 2021
bfe1fa0
Compiles
LaurieCheers-unity Apr 28, 2021
318d174
Sleep instead of yield
LaurieCheers-unity Apr 28, 2021
8109b39
Merge branch 'laurie/RosConnection2.0' into laurie/TFMonitoring
LaurieCheers-unity Apr 28, 2021
cf1677c
Fixed JointState, added more ScriptableObjects
at669 Apr 28, 2021
6358568
MessageRegistry is working
LaurieCheers-unity Apr 29, 2021
1aaa553
Simplified MessageRegistry!
LaurieCheers-unity Apr 29, 2021
aef8f27
Messages rebuilt
LaurieCheers-unity Apr 29, 2021
2e09c37
Added rosgraph messages
LaurieCheers-unity Apr 29, 2021
2029009
Remove reflection
LaurieCheers-unity Apr 30, 2021
a2a973a
Removed color and label from BasicVisualizer, added the concept of "H…
LaurieCheers-unity Apr 30, 2021
5421878
Don't show drawing checkboxes for visualizations that don't draw
LaurieCheers-unity Apr 30, 2021
0245c8a
Starting CameraInfo integration with Image
at669 Apr 30, 2021
3065b4e
Setting up Matrix Extensions
at669 Apr 30, 2021
836931d
Connection polish
LaurieCheers-unity Apr 30, 2021
3dcd3bc
Automatic window layout
LaurieCheers-unity Apr 30, 2021
664e357
Connection lights
LaurieCheers-unity May 3, 2021
94fb2a9
Generic extensible hud tabs
LaurieCheers-unity May 5, 2021
d4b665d
Modifications to compile for test build
at669 May 5, 2021
1b8112a
Merge branch 'amanda/visualize_sensor_msgs' into laurie/Visualization…
LaurieCheers-unity May 20, 2021
722b765
Merge
LaurieCheers-unity May 20, 2021
0c7c7e6
Merge branch 'dev' into laurie/VisualizationPackage
LaurieCheers-unity May 20, 2021
fe68df0
Merge fix
LaurieCheers-unity May 20, 2021
11fc266
Performance improvements on PointCloud2
LaurieCheers-unity May 20, 2021
42b29d0
Prep for presentation
LaurieCheers-unity May 20, 2021
61f1bb6
testing lint
hyounesy May 26, 2021
621e65c
testing lint
hyounesy May 26, 2021
a591182
sensor_msgs Feedback & Fixes (#112)
at669 Jun 1, 2021
3634820
CameraInfo/RegionOfInterest refactor (#119)
at669 Jun 16, 2021
46ddadf
Merge branch 'dev' into amanda/visualizers/ROS2
at669 Jun 29, 2021
76388af
Receiving messages but wrong message class
at669 Jun 29, 2021
8ea655d
ROS1 visualizations working
at669 Jun 29, 2021
8d976d9
ROS2 visualizations
at669 Jul 1, 2021
00149e5
Minor cleanup
at669 Jul 1, 2021
98f0ab0
calling subscribe also registers the subscriber (#125)
LaurieCheers-unity Jul 6, 2021
06e30ea
Save/Load Layout Settings (#114)
at669 Jul 6, 2021
940aef1
Visualizers Updates, Additions, Fixes (#124)
at669 Jul 6, 2021
63f830e
Laurie/ros2visualizers (#128)
LaurieCheers-unity Jul 15, 2021
a7413fc
Refactored Hud, deleted TopicVisualizationState
LaurieCheers-unity Jul 22, 2021
f612644
Refactor part 2 WIP
LaurieCheers-unity Jul 23, 2021
433b7c2
Merge branch 'dev' into laurie/HudRefactor
LaurieCheers-unity Jul 23, 2021
3b8b587
WIP2
LaurieCheers-unity Jul 23, 2021
75de059
Merge branch 'dev' into amanda/visualizers/ROS2
LaurieCheers-unity Jul 26, 2021
7cc720b
Merge branch 'amanda/visualizers/ROS2' into laurie/HudRefactor
LaurieCheers-unity Jul 26, 2021
08f08b4
Clean up
LaurieCheers-unity Jul 26, 2021
9c9b9c2
Clean up
LaurieCheers-unity Jul 26, 2021
1c02c5e
Moved settings tab into RosTcpConnector so it can be instantiated there
LaurieCheers-unity Jul 26, 2021
7bee9cb
Subscribers are notified when we publish a message, too
LaurieCheers-unity Jul 28, 2021
72d394f
Quick fixes
LaurieCheers-unity Jul 28, 2021
43c11cd
LoadLayout in Awake
LaurieCheers-unity Jul 28, 2021
91c1dbc
Fix for null topicInfo
LaurieCheers-unity Jul 29, 2021
6560451
Starting to refactor visualizations out of RosTcpConnector
LaurieCheers-unity Aug 10, 2021
53acef3
Further Visualizers refactoring
LaurieCheers-unity Aug 11, 2021
2559527
Basic visualization works
LaurieCheers-unity Aug 12, 2021
8496510
Moving drawing code into DefaultVisualizers
LaurieCheers-unity Aug 13, 2021
34ff639
Added an example multi-message visualizer
LaurieCheers-unity Aug 13, 2021
fb54197
Visuals become inner classes of their respective Factories
LaurieCheers-unity Aug 13, 2021
484a567
DefaultVisualizerFoo -> FooDefaultVisualizer
LaurieCheers-unity Aug 13, 2021
a35811b
Hud tab ordering lives in a separate cs file
LaurieCheers-unity Aug 16, 2021
cdc8a84
Point clouds support RGB channel
LaurieCheers-unity Aug 17, 2021
76739fc
Laurie/hud refactor (#145)
LaurieCheers-unity Aug 17, 2021
da2a596
Swap r/b color channels to match RViz
LaurieCheers-unity Aug 17, 2021
aec1629
Merge dev into VisualizationPackage
LaurieCheers-unity Aug 18, 2021
ac10942
Merged amanda/viz/ROS2
LaurieCheers-unity Aug 24, 2021
c7361b7
Laurie/multi tf (#160)
LaurieCheers-unity Aug 25, 2021
7b66459
Adding TF tracking for misc messages (#161)
at669 Aug 26, 2021
de29687
Laurie/image msg optimizations (#169)
LaurieCheers-unity Aug 31, 2021
9e4a06e
UI, coding standards, dev branch (#177)
LaurieCheers-unity Sep 10, 2021
693b2b6
Laurie/joy settings (#168)
LaurieCheers-unity Sep 10, 2021
f9139e9
Restored ToImageMsg
LaurieCheers-unity Sep 10, 2021
6f4c3e4
Don't make blank headers
LaurieCheers-unity Sep 10, 2021
d35f321
Final tweaks
LaurieCheers-unity Sep 10, 2021
2ec891b
Updated docs, renamed some things
LaurieCheers-unity Sep 13, 2021
c823936
Allow RegisterPublisher without knowing the type at compile time
LaurieCheers-unity Sep 14, 2021
f04bf32
Merge branch 'dev' of https://github.com/Unity-Technologies/ROS-TCP-C…
hyounesy Sep 15, 2021
be6f15a
Remove generic parameter from Publish
LaurieCheers-unity Sep 15, 2021
6091798
Minor Visualizations Bugs (#181)
at669 Sep 16, 2021
dc8cb29
Merge branch 'laurie/VisualizationPackage' of https://github.com/Unit…
LaurieCheers-unity Sep 16, 2021
6851e49
MultiDrawingVisualizer -> HistoryDrawingVisualizer (#184)
LaurieCheers-unity Sep 20, 2021
bcc91cc
Update DefaultVisualizationSuite.prefab (#182)
LaurieCheers-unity Sep 20, 2021
f910727
Laurie/editor visualizer windows (#185)
LaurieCheers-unity Sep 21, 2021
5d2bb3b
Laurie/default visualization suite (#186)
LaurieCheers-unity Sep 21, 2021
bae3d9b
Minor polish
LaurieCheers-unity Sep 21, 2021
6d53c4d
Laurie/occupancy grid polish (#187)
LaurieCheers-unity Sep 23, 2021
48f99de
Renamed "message-visualizations" to "visualizations" (#188)
LaurieCheers-unity Sep 24, 2021
35a7251
MessageVisualizations -> Visualizations namespace (#190)
at669 Sep 24, 2021
6f50db2
Regenerated TF2 msgs (#191)
at669 Sep 24, 2021
bfbf977
GetOrCreateInstance shouldn't always create a new instance!
LaurieCheers-unity Sep 28, 2021
398897a
Visualizations Usage Documentation (#172)
at669 Sep 28, 2021
c42c04d
Path visualizer has a default thickness; Occupancy grid can be turned…
LaurieCheers-unity Sep 29, 2021
985ab52
WIP: AIRO-1243 Make Unity ROS Service Async (#189)
sdiao Sep 29, 2021
ef045be
Final UI pass (#192)
LaurieCheers-unity Sep 29, 2021
67a75d1
Service response visualizations work
LaurieCheers-unity Sep 29, 2021
69ba15c
Merge branch 'dev' into laurie/VisualizationPackage
LaurieCheers-unity Sep 29, 2021
e891831
Revert "Update unity-ros coordinate transformation (#174)"
LaurieCheers-unity Sep 29, 2021
6d5258f
Merge branch 'laurie/RevertCoordinateSpacesChange' into laurie/Visual…
LaurieCheers-unity Sep 29, 2021
b5a58e4
Clean up bad merge
LaurieCheers-unity Sep 30, 2021
bbc0625
Clean up and prep for release
LaurieCheers-unity Sep 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ We run continuous integration on all PRs; all tests must be passing before the P

All Python code should follow the [PEP 8 style guidelines](https://pep8.org/).

All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions). (Code may be reformatted to Unity coding standards where applicable.)
All C# code should follow the [Microsoft C# Coding Conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions).
(Code may be reformatted to Unity coding standards where applicable.)

Please note that even if the code you are changing does not follow these conventions,
we expect your submissions to do so.
Expand Down
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ROS-TCP-Connector
# ROS TCP Connector

[![Version](https://img.shields.io/github/v/tag/Unity-Technologies/ROS-TCP-Connector)](https://github.com/Unity-Technologies/ROS-TCP-Connector/releases)
[![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE.md)
Expand All @@ -7,24 +7,37 @@
![ROS](https://img.shields.io/badge/ros2-foxy-brightgreen)
![Unity](https://img.shields.io/badge/unity-2020.2+-brightgreen)

## Introduction

This repository contains two Unity packages: the ROS TCP Connector, for sending/receiving messages from ROS, and the Visualizations Package, for adding visualizations of incoming and outgoing messages in the Unity scene.

## Installation
1. Using Unity 2020.2 or later, open the package manager from `Window` -> `Package Manager` and select "Add package from git URL..."
![image](https://user-images.githubusercontent.com/29758400/110989310-8ea36180-8326-11eb-8318-f67ee200a23d.png)
2. Enter the following URL. If you don't want to use the latest version, substitute your desired version tag where we've put `v0.5.0` in this example:
`https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector#v0.5.0`
3. Click `Add`.
1. Using Unity 2020.2 or later, open the Package Manager from `Window` -> `Package Manager`.
2. In the Package Manager window, find and click the + button in the upper lefthand corner of the window. Select `Add package from git URL....`

![image](https://user-images.githubusercontent.com/29758400/110989310-8ea36180-8326-11eb-8318-f67ee200a23d.png)

3. Enter the git URL for the desired package. Note: you can append a version tag to the end of the git url, like `#v0.4.0` or `#v0.5.0`, to declare a specific package version, or exclude the tag to get the latest from the package's `main` branch.
1. For the ROS-TCP-Connector, enter `https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector`.
2. For Visualizations, enter `https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.visualizations`.
4. Click `Add`.

To install from a local clone of the repository, see [installing a local package](https://docs.unity3d.com/Manual/upm-ui-local.html) in the Unity manual.

## Tutorials
Scripts used to send [ROS](https://www.ros.org/) messages to an [TCP endpoint](https://github.com/Unity-Technologies/ROS_TCP_Endpoint) running as a ROS node.
<!-- Scripts used to send [ROS](https://www.ros.org/) messages to an [TCP endpoint](https://github.com/Unity-Technologies/ROS_TCP_Endpoint) running as a ROS node. -->

This Unity package provides four main features:

This Unity package provides three main features:
- ROSConnection: A component that sets up communication between ROS and Unity. See the [Unity Robotics Hub](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/README.md) for information and tutorials.

- ROSConnection: See the [Unity Robotics Hub](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_unity_integration/README.md) repository for information and tutorials on how to use this component.
- [Message Generation](MessageGeneration.md): A tool to generate C# classes for ROS message types.

- [Message Generation](MessageGeneration.md)
- Visualizations: A suite of default configurations and APIs to visualize incoming and outgoing information from ROS.
- See the [Nav2 SLAM Example](https://github.com/Unity-Technologies/Robotics-Nav2-SLAM-Example) for tutorials on using the Visualizations Package!
- You can also view the package's [Usage Information](com.unity.robotics.visualizations/Documentation~/README.md) for more details on using the package in your own project.

- [ROSGeometry](ROSGeometry.md)
- [ROSGeometry](ROSGeometry.md): A set of extensions that convert geometries between Unity and other coordinate frames.

## ROS#

Expand Down
2 changes: 1 addition & 1 deletion ROSGeometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Unity's standard Transform class also has a `To<C>()` extension method that retu

# Internal details

Some more detail about what's going on here: The core of the ROSGeometry package is the two generic structs, `Vector3<C>` and `Quaternion<C>`. The type parameter C here indicates the coordinate frame you're working in - either FLU, or RUF, or perhaps one of the more exotic frames such as NED (north, east, down) or ENU (east, north, up), used in aviation. In conversions between RUF and geographical coordinate systems, such as NED and ENU, the east direction is equivalent to the z-axis (forward) in RUF.
Some more detail about what's going on here: The core of the ROSGeometry package is the two generic structs, `Vector3<C>` and `Quaternion<C>`. The type parameter C here indicates the coordinate frame you're working in - either FLU, or RUF, or perhaps one of the more exotic frames such as NED (north, east, down) or ENU (east, north, up), used in aviation.

These are fully-fledged Vector3 and Quaternion classes, so if you want, you can work with them directly to perform geometric operations in an arbitrary coordinate space. (Note, it's a compile time error to add a Vector3<FLU> to a Vector3<RUF>.)

Expand Down
3 changes: 1 addition & 2 deletions com.unity.robotics.ros-tcp-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Upgrade the TestRosTcpConnector project to use Unity LTS version 2020.3.11f1

- Added an optional pooling system for ros publishers
- Implemented a queueing and latching system to mimic the ROS implementation in Unity
- Add support for visualizations

### Changed
- Publishing a message to an unregistered topic will show an error.
Expand Down Expand Up @@ -58,8 +59,6 @@ Add badges to main README

### Changed

Update the transformation of coordinate spaces using Unity's coordinate as right, up, forward (RUF) and south, up, east (SUE).

### Deprecated

### Removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Unity.Robotics.ROSTCPConnector.MessageGeneration
public class ActionAutoGen
{
private static readonly string[] types = { "Goal", "Result", "Feedback" };
private static readonly MessageSubtopic[] subtopics = { MessageSubtopic.Goal, MessageSubtopic.Result, MessageSubtopic.Feedback };

public static string[] GetActionClassPaths(string inFilePath, string outPath)
{
Expand Down Expand Up @@ -76,7 +77,16 @@ public static List<string> GenerateSingleAction(string inPath, string outPath, s
string className = inFileName + types[i] + MsgAutoGenUtilities.ActionClassSuffix;

// Parse and generate goal, result, feedback messages
MessageParser parser = new MessageParser(tokens, outPath, rosPackageName, "action", MsgAutoGenUtilities.builtInTypesMapping, MsgAutoGenUtilities.builtInTypesDefaultInitialValues, className);
MessageParser parser = new MessageParser(
tokens,
outPath,
rosPackageName,
"action",
MsgAutoGenUtilities.builtInTypesMapping,
MsgAutoGenUtilities.builtInTypesDefaultInitialValues,
className,
subtopic: subtopics[i]
);
parser.Parse();
warnings.AddRange(parser.GetWarnings());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ public class MessageParser
private HashSet<string> defaultValues = new HashSet<string>();

private string body = "";
MessageSubtopic subtopic;

private List<string> warnings = new List<string>();

public MessageParser(List<MessageToken> tokens, string outPath, string rosPackageName, string type, Dictionary<string, string> builtInTypeMapping, Dictionary<string, string> builtInTypesDefaultInitialValues, string className = "", string rosMsgName = "")
public MessageParser(List<MessageToken> tokens, string outPath, string rosPackageName, string type, Dictionary<string, string> builtInTypeMapping, Dictionary<string, string> builtInTypesDefaultInitialValues, string className = "", string rosMsgName = "", MessageSubtopic subtopic = MessageSubtopic.Default)
{
this.tokens = tokens;

Expand All @@ -61,6 +62,8 @@ public MessageParser(List<MessageToken> tokens, string outPath, string rosPackag
this.rosPackageName = rosPackageName;
this.rosPackageNamespace = MsgAutoGenUtilities.ResolvePackageName(rosPackageName);

this.subtopic = subtopic;

if (className.Equals(""))
{
this.className = MsgAutoGenUtilities.CapitalizeFirstLetter(inFileName) + MsgAutoGenUtilities.MessageClassSuffix;
Expand Down Expand Up @@ -151,6 +154,8 @@ public void Parse()
// Write ToString override
writer.Write(GenerateToString());

string subtopicParameter = subtopic == MessageSubtopic.Default ? "" : $", MessageSubtopic.{subtopic}";

writer.Write(
"\n" +
"#if UNITY_EDITOR\n" +
Expand All @@ -160,7 +165,7 @@ public void Parse()
"#endif\n" +
TWO_TABS + "public static void Register()\n" +
TWO_TABS + "{\n" +
THREE_TABS + "MessageRegistry.Register(k_RosMessageName, Deserialize);\n" +
THREE_TABS + $"MessageRegistry.Register(k_RosMessageName, Deserialize{subtopicParameter});\n" +
TWO_TABS + "}\n"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ public static List<string> GenerateSingleService(string inPath, string outPath,
// Service is made up of request and response
string className = inFileName + MsgAutoGenUtilities.ServiceClassSuffix + types[i];

MessageParser parser = new MessageParser(tokens, outPath, rosPackageName, "srv", MsgAutoGenUtilities.builtInTypesMapping, MsgAutoGenUtilities.builtInTypesDefaultInitialValues, className);
MessageParser parser = new MessageParser(
tokens,
outPath,
rosPackageName,
"srv",
MsgAutoGenUtilities.builtInTypesMapping,
MsgAutoGenUtilities.builtInTypesDefaultInitialValues,
className,
subtopic: i == 0 ? MessageSubtopic.Default : MessageSubtopic.Response);
parser.Parse();
warnings.AddRange(parser.GetWarnings());
}
Expand Down
31 changes: 25 additions & 6 deletions com.unity.robotics.ros-tcp-connector/Editor/ROSSettingsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public static void OpenWindow()
{
ROSSettingsEditor window = GetWindow<ROSSettingsEditor>(false, "ROS Settings", true);
window.minSize = new Vector2(300, 65);
window.maxSize = new Vector2(600, 250);
window.maxSize = new Vector2(600, 500);
window.Show();
}

GameObject prefabObj;
ROSConnection prefab;
Unity.Robotics.ROSTCPConnector.ROSConnection prefab;

public enum RosProtocol
{
Expand All @@ -35,6 +35,9 @@ public enum RosProtocol
const RosProtocol k_AlternateProtocol = RosProtocol.ROS2;
#endif

[SerializeField] string[] m_TFTopics;
UnityEditor.Editor editor;

protected virtual void OnGUI()
{
if (prefab == null)
Expand All @@ -49,8 +52,7 @@ protected virtual void OnGUI()
sceneObj.AddComponent<ROSConnection>();
if (!Directory.Exists("Assets/Resources"))
Directory.CreateDirectory("Assets/Resources");
prefabObj = PrefabUtility.SaveAsPrefabAsset(sceneObj,
"Assets/Resources/ROSConnectionPrefab.prefab");
prefabObj = PrefabUtility.SaveAsPrefabAsset(sceneObj, "Assets/Resources/ROSConnectionPrefab.prefab");
if (prefabObj != null)
prefab = prefabObj.GetComponent<ROSConnection>();
DestroyImmediate(sceneObj);
Expand Down Expand Up @@ -96,8 +98,8 @@ protected virtual void OnGUI()
prefab.RosPort = EditorGUILayout.IntField("ROS Port", prefab.RosPort);

// Also set the player prefs, for users who hit play in the editor: they will expect the last-used IP address to appear in the hud
HUDPanel.SetIPPref(prefab.RosIPAddress);
HUDPanel.SetPortPref(prefab.RosPort);
ROSConnection.SetIPPref(prefab.RosIPAddress);
ROSConnection.SetPortPref(prefab.RosPort);

EditorGUILayout.Space();

Expand Down Expand Up @@ -127,10 +129,27 @@ protected virtual void OnGUI()
"Sleep this long before checking for new network messages. (Decreasing this time will make it respond faster, but consume more CPU)."),
prefab.SleepTimeSeconds);

// TODO: make the settings input update the prefab
// EditorGUILayout.Space();
// if (!editor) { editor = UnityEditor.Editor.CreateEditor(this); }
// if (editor) { editor.OnInspectorGUI(); }

if (GUI.changed)
{
PrefabUtility.SavePrefabAsset(prefab.gameObject);
}
}

void OnInspectorUpdate() { Repaint(); }
}

[CustomEditor(typeof(ROSSettingsEditor), true)]
public class TFTopicsEditorDrawer : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
var list = serializedObject.FindProperty("m_TFTopics");
EditorGUILayout.PropertyField(list, new GUIContent("TF Topics"), true);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "Unity.Robotics.ROSTCPConnector.Editor",
"rootNamespace": "",
"references": [
"GUID:625bfc588fb96c74696858f2c467e978"
],
Expand Down
Loading