Skip to content

Commit

Permalink
add texture plugin and panther urdf (#2)
Browse files Browse the repository at this point in the history
* add texture plugin and panther urdf

* rename compose file
  • Loading branch information
pkowalsk1 authored May 23, 2023
1 parent 7d817e2 commit 2ac4575
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 9 deletions.
39 changes: 32 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,41 @@ FROM ros:$ROS_DISTRO-ros-core

SHELL ["/bin/bash", "-c"]

RUN apt-get update && apt-get install -y \
ros-$ROS_DISTRO-rviz && \
WORKDIR /ros_ws

RUN apt update && apt install -y \
git \
python3-dev \
python3-pip \
qtbase5-dev \
qtdeclarative5-dev \
ros-$ROS_DISTRO-rviz \
ros-$ROS_DISTRO-rviz-visual-tools && \
pip3 install \
rosdep && \
# rviz_textured_quads pkg
git clone https://github.com/husarion/rviz_textured_quads.git ./src/rviz_textured_quads && \
# panther_description pkg
mkdir -p src/panther_ros && \
pushd src/panther_ros && \
git init && \
git remote add -f origin https://github.com/husarion/panther_ros.git && \
git sparse-checkout init && \
git sparse-checkout set "panther_description" && \
git pull origin ros1 && \
popd && \
source /opt/ros/$ROS_DISTRO/setup.bash && \
rosdep init && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install --from-paths src -y -i && \
catkin_make -DCATKIN_ENABLE_TESTING=0 -DCMAKE_BUILD_TYPE=Release && \
apt-get upgrade -y && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# ENV NVIDIA_VISIBLE_DEVICES \
# ${NVIDIA_VISIBLE_DEVICES:-all}
# ENV NVIDIA_DRIVER_CAPABILITIES \
# ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
COPY ./ros_entrypoint.sh /

RUN echo ". /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
ENTRYPOINT ["/ros_entrypoint.sh"]

CMD ["rosrun", "rviz", "rviz"]
12 changes: 12 additions & 0 deletions demo/compose.panther.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:

rviz:
image: husarion/rviz:noetic
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ./panther.rviz:/root/.rviz/default.rviz
environment:
- DISPLAY=${DISPLAY:?You need to define display env}
- ROS_MASTER_URI=${ROS_MASTER_URI:-http://10.15.20.2:11311}
- ROS_IP=${ROS_IP:-10.15.20.3}
- LIBGL_ALWAYS_SOFTWARE=1
2 changes: 1 addition & 1 deletion demo/compose.host.yaml → demo/compose.rosbot.host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
network_mode: host
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ./default.rviz:/root/.rviz/default.rviz
- ./rosbot.rviz:/root/.rviz/default.rviz
environment:
- DISPLAY=${DISPLAY:?You need to define display env}
- ROS_MASTER_URI=${ROS_MASTER_URI:-http://127.0.0.1:11311}
Expand Down
2 changes: 1 addition & 1 deletion demo/compose.yaml → demo/compose.rosbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
restart: unless-stopped
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ./default.rviz:/root/.rviz/default.rviz
- ./rosbot.rviz:/root/.rviz/default.rviz
environment:
- DISPLAY=${DISPLAY:?You need to define display env}
- ROS_MASTER_URI=http://ros-master:11311
Expand Down
246 changes: 246 additions & 0 deletions demo/panther.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /TF1/Frames1
Splitter Ratio: 0.5
Tree Height: 544
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: Image
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/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
- Alpha: 1
Class: rviz/RobotModel
Collision Enabled: false
Enabled: true
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
body_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
cover_link:
Alpha: 1
Show Axes: false
Show Trail: false
fl_wheel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
fr_wheel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
front_animation_link:
Alpha: 1
Show Axes: false
Show Trail: false
front_light_link:
Alpha: 1
Show Axes: false
Show Trail: false
imu_link:
Alpha: 1
Show Axes: false
Show Trail: false
rear_animation_link:
Alpha: 1
Show Axes: false
Show Trail: false
rear_light_link:
Alpha: 1
Show Axes: false
Show Trail: false
rl_wheel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
rr_wheel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
Name: RobotModel
Robot Description: robot_description
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
- Class: rviz/TF
Enabled: false
Filter (blacklist): ""
Filter (whitelist): ""
Frame Timeout: 15
Frames:
All Enabled: true
Marker Alpha: 1
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
{}
Update Interval: 0
Value: false
- Class: rviz/Image
Enabled: true
Image Topic: /panther/lights/driver/rear_panel_frame
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Unreliable: false
Value: true
- Class: rviz/Image
Enabled: true
Image Topic: /panther/lights/driver/rear_panel_frame
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Unreliable: false
Value: true
- Canvas mesh high: 0.014999999664723873
Class: rviz_textured_quads/MeshDisplayCustom
Enabled: true
Image Topic: /panther/lights/driver/front_panel_frame
Meters per pixel: 0.010900000110268593
Name: MeshDisplayCustom
Quad Frame: front_animation_link
Value: true
- Canvas mesh high: 0.014999999664723873
Class: rviz_textured_quads/MeshDisplayCustom
Enabled: true
Image Topic: /panther/lights/driver/rear_panel_frame
Meters per pixel: 0.010900000110268593
Name: MeshDisplayCustom
Quad Frame: rear_animation_link
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: base_link
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
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- 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: 1.7334181070327759
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: -0.18467888236045837
Y: -0.08083157986402512
Z: -0.020288554951548576
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.6053981184959412
Target Frame: <Fixed Frame>
Yaw: 0.655398428440094
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1016
Hide Left Dock: false
Hide Right Dock: false
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd0000000400000000000001c30000035efc020000000bfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000002a9000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d00650072006100000003e7000001960000000000000000fb0000000a0049006d00610067006501000002ea000000550000001600fffffffb0000000a0049006d0061006700650100000345000000540000001600ffffff000000010000010f00000542fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003b00000542000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007360000003efc0100000002fb0000000800540069006d00650100000000000007360000030700fffffffb0000000800540069006d006501000000000000045000000000000000000000056d0000035e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1846
X: 74
Y: 27
File renamed without changes.
8 changes: 8 additions & 0 deletions ros_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

# setup ros environment
source "/opt/ros/$ROS_DISTRO/setup.bash"
source "/ros_ws/devel/setup.bash"

exec "$@"

0 comments on commit 2ac4575

Please sign in to comment.