-
Notifications
You must be signed in to change notification settings - Fork 52
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
Menu based teleop plugins #721
Open
weiqiyang
wants to merge
21
commits into
jsk-ros-pkg:master
Choose a base branch
from
weiqiyang:base_pose
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 17 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
ca0849e
Deleted meaningless spaces in joy.py. Fixed typo in joy_pose_6d.py us…
weiqiyang 127eee9
Made (START+SELECT) function as HOME key for Ipega
weiqiyang 9df7e24
Add plugin base_pose, which only allows horizontal movements.
weiqiyang c2ca9bd
Add sample launch file for joy controlled OverlayMenu and several plu…
weiqiyang c228a50
Publish base_pos to goal by pressing triangle.
weiqiyang a565a70
Add pose plugin that publishes a command topic when pressing certain …
weiqiyang f3437ae
add comments
weiqiyang 4110984
Add joy_bounding_box_selector plugin with a sample launch file.
weiqiyang 17b7920
Fixed publisher behaviour when publish_pose is false. Modified comman…
weiqiyang f682b90
Fixed a bug caused by empty bounding_box_array. Add command topic.
weiqiyang e7032e4
Made command text published on button pressing changeable from launch…
weiqiyang 2fe1202
Remove save/load pose function from joy_target_6d (will be applied ba…
weiqiyang 4dac789
Add docstring for the plugins
weiqiyang 5f8c869
Add docstring. Fixed typos
weiqiyang 2f57efa
Fixed typo. Optimized selecting algorithm of bbox.
weiqiyang da1fdf5
optimized joy_reverse_axis by using toPS3Msg()
weiqiyang f593931
Fixed bug in base_pose caused by time sync. Optimized queue_size.
weiqiyang 4f8c56a
Renamed sample launch file.
weiqiyang 9304651
fixed typo
weiqiyang c14340d
fixed typo
weiqiyang 4f7264b
Change to snake case and 4-space indents
weiqiyang 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
140 changes: 140 additions & 0 deletions
140
jsk_teleop_joy/launch/config/sample_joy_bounding_box_selector.rviz
This file contains 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,140 @@ | ||
Panels: | ||
- Class: rviz/Displays | ||
Help Height: 78 | ||
Name: Displays | ||
Property Tree Widget: | ||
Expanded: | ||
- /Global Options1 | ||
- /Status1 | ||
- /BoundingBoxArray1 | ||
- /BoundingBox1 | ||
Splitter Ratio: 0.544444 | ||
Tree Height: 565 | ||
- Class: rviz/Selection | ||
Name: Selection | ||
- Class: rviz/Tool Properties | ||
Expanded: | ||
- /2D Pose Estimate1 | ||
- /2D Nav Goal1 | ||
- /Publish Point1 | ||
Name: Tool Properties | ||
Splitter Ratio: 0.588679 | ||
- Class: rviz/Views | ||
Expanded: | ||
- /Current View1 | ||
Name: Views | ||
Splitter Ratio: 0.5 | ||
- Class: rviz/Time | ||
Experimental: false | ||
Name: Time | ||
SyncMode: 0 | ||
SyncSource: "" | ||
Visualization Manager: | ||
Class: "" | ||
Displays: | ||
- Alpha: 0.5 | ||
Cell Size: 1 | ||
Class: rviz/Grid | ||
Color: 160; 160; 164 | ||
Enabled: true | ||
Line Style: | ||
Line Width: 0.03 | ||
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: jsk_rviz_plugin/BoundingBoxArray | ||
Enabled: true | ||
Name: BoundingBoxArray | ||
Topic: /bounding_box_array_publisher/output | ||
Unreliable: false | ||
Value: true | ||
alpha: 0.8 | ||
color: 25; 255; 0 | ||
coloring: Auto | ||
line width: 0.005 | ||
only edge: false | ||
show coords: false | ||
- Class: jsk_rviz_plugin/BoundingBox | ||
Enabled: true | ||
Name: BoundingBox | ||
Topic: /selected_bbox | ||
Unreliable: false | ||
Value: true | ||
alpha: 0.8 | ||
color: 255; 0; 0 | ||
coloring: Flat color | ||
line width: 0.01 | ||
only edge: true | ||
show coords: false | ||
- Class: jsk_rviz_plugin/OverlayMenu | ||
Enabled: true | ||
Name: OverlayMenu | ||
Topic: /overlay_menu | ||
Value: true | ||
Enabled: true | ||
Global Options: | ||
Background Color: 48; 48; 48 | ||
Fixed Frame: map | ||
Frame Rate: 30 | ||
Name: root | ||
Tools: | ||
- Class: rviz/Interact | ||
Hide Inactive Objects: true | ||
- Class: rviz/MoveCamera | ||
- Class: rviz/Select | ||
- Class: rviz/FocusCamera | ||
- Class: rviz/Measure | ||
- Class: rviz/SetInitialPose | ||
Topic: /initialpose | ||
- Class: rviz/SetGoal | ||
Topic: /move_base_simple/goal | ||
- Class: rviz/PublishPoint | ||
Single click: true | ||
Topic: /clicked_point | ||
Value: true | ||
Views: | ||
Current: | ||
Class: rviz/Orbit | ||
Distance: 2.09505 | ||
Enable Stereo Rendering: | ||
Stereo Eye Separation: 0.06 | ||
Stereo Focal Distance: 1 | ||
Swap Stereo Eyes: false | ||
Value: false | ||
Focal Point: | ||
X: -0.436994 | ||
Y: 0.0773152 | ||
Z: 0.912857 | ||
Name: Current View | ||
Near Clip Distance: 0.01 | ||
Pitch: 0.325398 | ||
Target Frame: <Fixed Frame> | ||
Value: Orbit (rviz) | ||
Yaw: 6.19358 | ||
Saved: ~ | ||
Window Geometry: | ||
Displays: | ||
collapsed: false | ||
Height: 846 | ||
Hide Left Dock: false | ||
Hide Right Dock: false | ||
QMainWindow State: 000000ff00000000fd00000004000000000000016a000002c4fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000002c4000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002c4fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000028000002c4000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b0000002f600fffffffb0000000800540069006d006501000000000000045000000000000000000000022b000002c400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 | ||
Selection: | ||
collapsed: false | ||
Time: | ||
collapsed: false | ||
Tool Properties: | ||
collapsed: false | ||
Views: | ||
collapsed: false | ||
Width: 1200 | ||
X: 55 | ||
Y: 20 |
This file contains 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,44 @@ | ||
<launch> | ||
<arg name="CONTROLLER_TYPE" default="auto" /> | ||
<arg name="DEV" default="/dev/input/js0" /> | ||
<arg name="POSE_REMAP" default="joy_pose" /> | ||
<arg name="FRAME_ID" default="base_footprint" /> | ||
<node pkg="joy" type="joy_node" name="joy_driver" output="screen" > | ||
<param name="dev" type="string" value="$(arg DEV)" /> | ||
<param name="deadzone" value="0.2" /> | ||
<param name="autorepeat_rate" value="40" /> | ||
<param name="coalesce_interval" value="0.025" /> | ||
</node> | ||
<node pkg="jsk_teleop_joy" type="joy.py" name="joy" output="screen" | ||
clear_params="true"> | ||
<param name="controller_type" value="$(arg CONTROLLER_TYPE)" /> | ||
<rosparam subst_value="true"> | ||
plugins: | ||
'JoyTarget6D': | ||
class: 'JoyTarget6D' | ||
args: | ||
publish_pose: True | ||
pose: $(arg POSE_REMAP) | ||
frame_id: $(arg FRAME_ID) | ||
follow_view: true | ||
triangle_cmd: "PREVIEW" | ||
circle_cmd: "EXECUTE" | ||
cross_cmd: "CANCEL" | ||
'Verbose': | ||
class: 'VerboseStatus' | ||
args: | ||
publish_pose: True | ||
pose: $(arg POSE_REMAP) | ||
frame_id: $(arg FRAME_ID) | ||
follow_view: true | ||
'BasePose': | ||
class: 'BasePose' | ||
args: | ||
publish_pose: True | ||
pose: 'base_goal' | ||
frame_id: $(arg FRAME_ID) | ||
follow_view: true | ||
z: 1.0 | ||
</rosparam> | ||
</node> | ||
</launch> |
72 changes: 72 additions & 0 deletions
72
jsk_teleop_joy/launch/sample_joy_bounding_box_selector.launch
This file contains 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,72 @@ | ||
<launch> | ||
<arg name="CONTROLLER_TYPE" default="auto" /> | ||
<arg name="DEV" default="/dev/input/js0" /> | ||
<arg name="POSE_REMAP" default="joy_pose" /> | ||
<arg name="FRAME_ID" default="map" /> | ||
|
||
<arg name="gui" default="true" /> | ||
|
||
<node name="static_tf_publisher_map_to_shelf" | ||
pkg="tf" type="static_transform_publisher" | ||
args="0 0 1 0 0 0 map shelf_base 100"> | ||
</node> | ||
|
||
<node name="bounding_box_array_publisher" | ||
pkg="jsk_recognition_utils" type="bounding_box_array_publisher.py"> | ||
<rosparam> | ||
frame_id: shelf_base | ||
boxes: | ||
- position: [-0.22, 0.280, 0.361] | ||
dimension: [0.37, 0.248, 0.218] | ||
- position: [-0.22, 0, 0.361] | ||
dimension: [0.37, 0.306, 0.218] | ||
- position: [-0.22, -0.280, 0.361] | ||
dimension: [0.37, 0.248, 0.218] | ||
- position: [-0.22, 0.280, 0.116] | ||
dimension: [0.37, 0.248, 0.192] | ||
- position: [-0.22, 0, 0.116] | ||
dimension: [0.37, 0.306, 0.192] | ||
- position: [-0.22, -0.280, 0.116] | ||
dimension: [0.37, 0.248, 0.192] | ||
- position: [-0.22, 0.280, -0.116] | ||
dimension: [0.37, 0.248, 0.192] | ||
- position: [-0.22, 0, -0.116] | ||
dimension: [0.37, 0.306, 0.192] | ||
- position: [-0.22, -0.280, -0.116] | ||
dimension: [0.37, 0.248, 0.192] | ||
- position: [-0.22, 0.280, -0.361] | ||
dimension: [0.37, 0.248, 0.218] | ||
- position: [-0.22, 0, -0.361] | ||
dimension: [0.37, 0.306, 0.218] | ||
- position: [-0.22, -0.280, -0.361] | ||
dimension: [0.37, 0.248, 0.218] | ||
</rosparam> | ||
</node> | ||
|
||
<group if="$(arg gui)"> | ||
<node name="rviz" | ||
pkg="rviz" type="rviz" | ||
args="-d $(find jsk_teleop_joy)/launch/config/sample_joy_bounding_box_selector.rviz"> | ||
</node> | ||
</group> | ||
|
||
<node pkg="joy" type="joy_node" name="joy_driver" output="screen" > | ||
<param name="dev" type="string" value="$(arg DEV)" /> | ||
<param name="deadzone" value="0.2" /> | ||
<param name="autorepeat_rate" value="40" /> | ||
<param name="coalesce_interval" value="0.025" /> | ||
</node> | ||
<node pkg="jsk_teleop_joy" type="joy.py" name="joy" output="screen" | ||
clear_params="true"> | ||
<param name="controller_type" value="$(arg CONTROLLER_TYPE)" /> | ||
<rosparam subst_value="true"> | ||
plugins: | ||
'BBoxSelect': | ||
class: 'JoyBoundingBoxSelector' | ||
args: | ||
frame_id: $(arg FRAME_ID) | ||
input_boxes: '/bounding_box_array_publisher/output' | ||
output: '/selected_bbox' | ||
</rosparam> | ||
</node> | ||
</launch> |
This file contains 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
joy_plugin_sample.launch
->sample_joy_plugin.launch