Skip to content

ros2: Start porting #49

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
wants to merge 1 commit into
base: crystal-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Any contribution that you make to this repository will
be under the BSD??? License, ...

WHAT TO DO???
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BSD?
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# RViz Tutorials

**WARNING**: This is under development! At present, these tutorials are being
ported to ROS2 Crystal.

The following tutorials have been ported:

* `visualization_marker_tutorials`
* `basic_shapes`
* `points_and_lines`

All other tutorials have **not** been ported, and have been marked with
`COLCON_IGNORE`:

* `interactive_marker_tutorials`
* `librviz_tutorial`
* `rviz_plugin_tutorials`
* `rviz_python_tutorial`

## ROS1

See [old ROS1 Wiki](http://wiki.ros.org/rviz/Tutorials). For source, see
[`ros-visualization/visualization_tutorials@kinetic-devel`](https://github.com/ros-visualization/visualization_tutorials/tree/kinetic-devel).
Empty file.
Empty file added librviz_tutorial/COLCON_IGNORE
Empty file.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions visualization_marker_tutorials/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog for package visualization_marker_tutorials
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.11.0 (2019-04-05)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version won't work, as it prevents us from continuing to progress on the ROS 1 branch.

Also, this is not how releases work... Please just have here the porting changes, once that's merged we can look at a release, documented here: https://index.ros.org/doc/ros2/Tutorials/Releasing-a-ROS-2-package-with-bloom/

-------------------
* Initial porting to ROS2 Crystal

0.10.3 (2018-05-09)
-------------------

Expand Down
58 changes: 15 additions & 43 deletions visualization_marker_tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,20 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(visualization_marker_tutorials)

find_package(catkin REQUIRED COMPONENTS roscpp visualization_msgs)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(visualization_msgs REQUIRED)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
function(custom_executable target)
add_executable(${target} src/${target}.cpp)
ament_target_dependencies(${target}
"rclcpp"
"visualization_msgs")
install(TARGETS ${target}
DESTINATION lib/${PROJECT_NAME})
endfunction()

catkin_package(
CATKIN_DEPENDS roscpp visualization_msgs
)
custom_executable(basic_shapes)
custom_executable(points_and_lines)

###########
## Build ##
###########

include_directories(include
${catkin_INCLUDE_DIRS}
)

add_executable(basic_shapes src/basic_shapes.cpp)
target_link_libraries(basic_shapes
${catkin_LIBRARIES}
)

add_executable(points_and_lines src/points_and_lines.cpp)
target_link_libraries(points_and_lines
${catkin_LIBRARIES}
)

#############
## Install ##
#############

## Mark executables and/or libraries for installation
install(TARGETS
basic_shapes
points_and_lines
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
ament_package()
16 changes: 16 additions & 0 deletions visualization_marker_tutorials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Visualization Marker Tutorials

See Old ROS1 for User Interface instructions:

* [Markers: Sending Basic Shapes (C++)](http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Basic%20Shapes)
* [Markers: Points and Lines (C++)](http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Points%20and%20Lines)

To run this with your workspace built and sourced:

```sh
rviz2 -d ./config.rviz &
ros2 run visualization_marker_tutorials basic_shapes
# Look at pretty shapes! Then Ctrl+C it.
ros2 run visualization_marker_tutorials points_and_lines
# Look at the pretty colors!
```
115 changes: 115 additions & 0 deletions visualization_marker_tutorials/config.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
Panels:
- Class: rviz_common/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Marker1
Splitter Ratio: 0.5
Tree Height: 623
- Class: rviz_common/Selection
Name: Selection
- Class: rviz_common/Tool Properties
Expanded:
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz_common/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz_default_plugins/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Class: rviz_default_plugins/Marker
Enabled: true
Name: Marker
Namespaces:
basic_shapes: true
Queue Size: 10
Topic: /visualization_marker
Unreliable: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: my_frame
Frame Rate: 30
Name: root
Tools:
- Class: rviz_default_plugins/MoveCamera
- Class: rviz_default_plugins/Select
- Class: rviz_default_plugins/FocusCamera
- Class: rviz_default_plugins/Measure
Line color: 128; 128; 0
- Class: rviz_default_plugins/SetInitialPose
Topic: /initialpose
- Class: rviz_default_plugins/SetGoal
Topic: /move_base_simple/goal
- Class: rviz_default_plugins/PublishPoint
Single click: true
Topic: /clicked_point
Transformation:
Current:
Class: rviz_default_plugins/TF
Value: true
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 5.878479480743408
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: false
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.9553979635238647
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 2.0403969287872314
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 846
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd000000040000000000000156000002f8fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed0000021500000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000002f8000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002f8fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b000002f8000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d006501000000000000045000000000000000000000023f000002f800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1200
X: 1539
Y: 690
18 changes: 11 additions & 7 deletions visualization_marker_tutorials/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<package>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>visualization_marker_tutorials</name>
<version>0.10.3</version>
<version>0.11.0</version>
<description>The visulalization_marker_tutorials package</description>

<maintainer email="[email protected]">William Woodall</maintainer>
Expand All @@ -11,12 +12,15 @@

<author>Josh Faust</author>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>roscpp</build_depend>
<build_depend>rclcpp</build_depend>
<build_depend>visualization_msgs</build_depend>

<run_depend>roscpp</run_depend>
<run_depend>visualization_msgs</run_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>visualization_msgs</exec_depend>

</package>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
Loading