Merge pull request #4 from ROBOTIS-GIT/master

merge for sync kinetic-devel and master branch
This commit is contained in:
Yoonseok Pyo 2017-06-09 15:52:44 +09:00 committed by GitHub
commit 76d1136729
6 changed files with 51 additions and 3 deletions

View File

@ -36,7 +36,7 @@ find_package(gazebo REQUIRED
catkin_package(
INCLUDE_DIRS include
LIBRARIES turtlebot3_gazebo
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp sensor_msgs std_msgs tf
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp sensor_msgs std_msgs tf gazebo_ros
)
################################################################################

View File

@ -73,6 +73,7 @@ class GazeboRosTurtleBot3
ros::Subscriber joint_state_sub_;
double turning_radius_;
double rotate_angle_;
double front_distance_limit_;
double side_distance_limit_;

View File

@ -19,6 +19,7 @@
<build_depend>sensor_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>gazebo_ros</build_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>roscpp</run_depend>
@ -26,4 +27,5 @@
<run_depend>sensor_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>gazebo_ros</run_depend>
</package>

View File

@ -44,14 +44,16 @@ bool GazeboRosTurtleBot3::init()
if (!robot_model.compare("burger"))
{
turning_radius_ = 0.08;
rotate_angle_ = 50.0 * DEG2RAD;
front_distance_limit_ = 0.7;
side_distance_limit_ = 0.4;
}
else if (!robot_model.compare("waffle"))
{
turning_radius_ = 0.1435;
rotate_angle_ = 40.0 * DEG2RAD;
front_distance_limit_ = 0.7;
side_distance_limit_ = 0.7;
side_distance_limit_ = 0.6;
}
ROS_INFO("robot_model : %s", robot_model.c_str());
ROS_INFO("turning_radius_ : %lf", turning_radius_);
@ -112,7 +114,7 @@ bool GazeboRosTurtleBot3::controlLoop()
double wheel_radius = 0.033;
double turtlebot3_rotation = 0.0;
turtlebot3_rotation = ((100.0 * DEG2RAD) * turning_radius_ / wheel_radius);
turtlebot3_rotation = (rotate_angle_ * turning_radius_ / wheel_radius);
switch(turtlebot3_state_num)
{

View File

@ -1,12 +1,34 @@
<sdf version="1.4">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<!-- A ground plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<physics type="ode">
<real_time_update_rate>1000.0</real_time_update_rate>
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<ode>
<solver>
<type>quick</type>
<iters>150</iters>
<precon_iters>0</precon_iters>
<sor>1.400000</sor>
<use_dynamic_moi_rescaling>1</use_dynamic_moi_rescaling>
</solver>
<constraints>
<cfm>0.00001</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>2000.000000</contact_max_correcting_vel>
<contact_surface_layer>0.01000</contact_surface_layer>
</constraints>
</ode>
</physics>
</world>
</sdf>

View File

@ -10,6 +10,27 @@
<uri>model://ground_plane</uri>
</include>
<physics type="ode">
<real_time_update_rate>1000.0</real_time_update_rate>
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<ode>
<solver>
<type>quick</type>
<iters>150</iters>
<precon_iters>0</precon_iters>
<sor>1.400000</sor>
<use_dynamic_moi_rescaling>1</use_dynamic_moi_rescaling>
</solver>
<constraints>
<cfm>0.00001</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>2000.000000</contact_max_correcting_vel>
<contact_surface_layer>0.01000</contact_surface_layer>
</constraints>
</ode>
</physics>
<!-- A turtlebot symbol -->
<include>
<uri>model://turtlebot3</uri>