Skip to content
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
5 changes: 5 additions & 0 deletions simple_description/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.3)
project(simple_description)

find_package(catkin REQUIRED)
catkin_package()
175 changes: 175 additions & 0 deletions simple_description/config/simple_base_display.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
Splitter Ratio: 0.5
Tree Height: 1088
- 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
Experimental: false
Name: Time
SyncMode: 0
SyncSource: ""
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
Value: true
left_wheel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
right_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: true
Frame Timeout: 15
Frames:
All Enabled: true
base_link:
Value: true
left_wheel_link:
Value: true
right_wheel_link:
Value: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
base_link:
left_wheel_link:
{}
right_wheel_link:
{}
Update Interval: 0
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: 3.0742945671081543
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: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.9153988361358643
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 3.705394744873047
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1385
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd000000040000000000000156000004cbfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d000004cb000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000004cbfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d000004cb000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000009bd0000003efc0100000002fb0000000800540069006d00650100000000000009bd000002eb00fffffffb0000000800540069006d006501000000000000045000000000000000000000074c000004cb00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 2493
X: 67
Y: 27
19 changes: 19 additions & 0 deletions simple_description/launch/simple_base_display.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<launch>
<arg name="use_gui" default="true"/>
<arg name="rviz_config" default="$(find simple_description)/config/simple_base_display.rviz"/>

<!-- load robot_description to param_server -->
<param name="robot_description" command="$(find xacro)/xacro $(find simple_description)/urdfs/simple_base.urdf.xacro"/>

<!-- publish fake joint state/values -->
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="$(arg use_gui)"/>
</node>

<!-- publish tf -->
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>

<!-- rviz for visualization -->
<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rviz_config)"/>
</launch>
17 changes: 17 additions & 0 deletions simple_description/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package format="2">
<name>simple_description</name>
<version>0.0.0</version>
<description>The simple_description package</description>

<author email="[email protected]">Harsh Pandya</author>
<maintainer email="[email protected]">Harsh Pandya</maintainer>

<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<exec_depend>joint_state_publisher</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>rviz</exec_depend>
<exec_depend>xacro</exec_depend>
</package>
174 changes: 174 additions & 0 deletions simple_description/urdfs/simple_base.gazebo.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<?xml version="1.0"?>
<robot name="kuka_arm" xmlns:xacro="http://wiki.ros.org/xacro">
<!--Import urdf elements-->
<xacro:include filename="$(find simple_description)/urdfs/simple_base.urdf.xacro"/>

<!-- gazebo link properties -->
<gazebo reference="base_link">
<material>Gazebo/DarkGrey</material>
</gazebo>
<gazebo reference="right_wheel_link">
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="left_wheel_link">
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="caster_wheel_link">
<material>Gazebo/DarkGray</material>
<mu1 value="0.0"/>
<mu2 value="0.0"/>
</gazebo>
<gazebo reference="laser_link">
<material>Gazebo/Blue</material>
</gazebo>
<gazebo reference="camera_link">
<material>Gazebo/Blue</material>
</gazebo>

<!-- planar lidar -->
<gazebo reference="laser_link">
<sensor type="ray" name="head_hokuyo_sensor">
<pose>0 0 0 0 0 0</pose>
<visualize>false</visualize>
<update_rate>20</update_rate>
<ray>
<scan>
<horizontal>
<samples>720</samples>
<resolution>1</resolution>
<min_angle>-1.570796</min_angle>
<max_angle>1.570796</max_angle>
</horizontal>
</scan>
<range>
<min>0.10</min>
<max>20.0</max>
<resolution>0.01</resolution>
</range>
<noise>
<type>gaussian</type>
<mean>0.0</mean>
<stddev>0.01</stddev>
</noise>
</ray>
<plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_laser.so">
<topicName>scan</topicName>
<frameName>/laser_link</frameName>
<robotNamespace>simple_base</robotNamespace>
</plugin>
</sensor>
</gazebo>

<!-- rgbd camera -->
<link name="camera_rgb_frame"/>
<link name="camera_rgb_optical_frame"/>
<link name="camera_depth_frame"/>
<link name="camera_depth_optical_frame"/>

<joint name="camera_rgb_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0.022 0"/>
<parent link="camera_link"/>
<child link="camera_rgb_frame"/>
</joint>
<joint name="camera_rgb_optical_joint" type="fixed">
<origin rpy="${-M_PI/2} 0 ${-M_PI/2}" xyz="0 0 0"/>
<parent link="camera_rgb_frame"/>
<child link="camera_rgb_optical_frame"/>
</joint>
<joint name="camera_depth_joint" type="fixed">
<origin rpy="0 0 0" xyz="0 0.049 0"/>
<parent link="camera_link"/>
<child link="camera_depth_frame"/>
</joint>
<joint name="camera_depth_optical_joint" type="fixed">
<origin rpy="${-M_PI/2} 0 ${-M_PI/2}" xyz="0 0 0"/>
<parent link="camera_depth_frame"/>
<child link="camera_depth_optical_frame"/>
</joint>

<gazebo reference="camera_rgb_frame">
<sensor type="depth" name="rgbd_camera">
<always_on>true</always_on>
<update_rate>30.0</update_rate>
<camera>
<horizontal_fov>${70.0*M_PI/180.0}</horizontal_fov>
<image>
<format>B8G8R8</format>
<width>640</width>
<height>480</height>
</image>
<clip>
<near>0.1</near>
<far>10.0</far>
</clip>
</camera>
<plugin name="rgbd_camera_controller" filename="libgazebo_ros_openni_kinect.so">
<alwaysOn>true</alwaysOn>
<updateRate>30.0</updateRate>
<cameraName>camera</cameraName>
<imageTopicName>color/image_raw</imageTopicName>
<cameraInfoTopicName>color/camera_info</cameraInfoTopicName>
<depthImageTopicName>depth/image_raw</depthImageTopicName>
<depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
<pointCloudTopicName>depth/points</pointCloudTopicName>
<frameName>/camera_rgb_optical_frame</frameName>
<pointCloudCutoff>0.1</pointCloudCutoff>
<pointCloudCutoffMax>10.0</pointCloudCutoffMax>
<distortionK1>0.00000001</distortionK1>
<distortionK2>0.00000001</distortionK2>
<distortionK3>0.00000001</distortionK3>
<distortionT1>0.00000001</distortionT1>
<distortionT2>0.00000001</distortionT2>
<CxPrime>0</CxPrime>
<Cx>0</Cx>
<Cy>0</Cy>
<focalLength>0</focalLength>
<hackBaseline>0</hackBaseline>
<robotNamespace>simple_base</robotNamespace>
</plugin>
</sensor>
</gazebo>

<!-- imu plugin -->
<gazebo reference="imu_link">
<gravity>true</gravity>
<sensor name="imu_sensor" type="imu">
<always_on>true</always_on>
<update_rate>100</update_rate>
<visualize>true</visualize>
<topic>__default_topic__</topic>
<plugin filename="libgazebo_ros_imu_sensor.so" name="imu_plugin">
<topicName>imu</topicName>
<bodyName>/imu_link</bodyName>
<updateRateHZ>100</updateRateHZ>
<gaussianNoise>0.05</gaussianNoise>
<xyzOffset>0 0 0</xyzOffset>
<rpyOffset>0 0 0</rpyOffset>
<frameName>/imu_link</frameName>
<robotNamespace>simple_base</robotNamespace>
</plugin>
<pose>0 0 0 0 0 0</pose>
</sensor>
</gazebo>

<!-- diff drive controller -->
<gazebo>
<plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller">
<alwaysOn>true</alwaysOn>
<updateRate>100</updateRate>
<leftJoint>left_wheel_joint</leftJoint>
<rightJoint>right_wheel_joint</rightJoint>
<wheelSeparation>0.425</wheelSeparation>
<wheelDiameter>0.2</wheelDiameter>
<torque>0.1</torque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>wheel_odom</odometryTopic>
<odometryFrame>/odom</odometryFrame>
<robotBaseFrame>/base_footprint</robotBaseFrame>
<publishWheelTF>true</publishWheelTF>
<publishOdomTF>false</publishOdomTF>
<robotNamespace>simple_base</robotNamespace>
</plugin>
</gazebo>

</robot>
Loading