Skip to content

Commit

Permalink
final version
Browse files Browse the repository at this point in the history
  • Loading branch information
Haoran-Zhao committed Mar 30, 2018
1 parent 5093e4a commit 185fc5f
Show file tree
Hide file tree
Showing 11 changed files with 939 additions and 104 deletions.
6 changes: 3 additions & 3 deletions blocks_spawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
red_xmlStr = red_strStream.str();
// ROS_INFO_STREAM("urdf: \n" <<red_xmlStr);
// prepare the pawn model service message
spawn_model_req.initial_pose.position.x = 4.5;
spawn_model_req.initial_pose.position.x = 2;
spawn_model_req.initial_pose.position.z = 0.2;
spawn_model_req.initial_pose.orientation.x=0.0;
spawn_model_req.initial_pose.orientation.y=0.0;
Expand All @@ -101,7 +101,7 @@

ros::Time time_temp(0, 0);
ros::Duration duration_temp(0, 1000000);
apply_wrench_req.wrench.force.x = -5.5;
apply_wrench_req.wrench.force.x = -5.1;
apply_wrench_req.wrench.force.y = 0.0;
apply_wrench_req.wrench.force.z = 0.0;
apply_wrench_req.start_time = time_temp;
Expand Down Expand Up @@ -165,7 +165,7 @@
ROS_INFO_STREAM("");

ros::spinOnce();
ros::Duration(10.0).sleep(); // frequency control, spawn one cylinder in each loop
ros::Duration(20.0).sleep(); // frequency control, spawn one cylinder in each loop
// delay time decides density of the cylinders


Expand Down
6 changes: 4 additions & 2 deletions launch/initialize.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<launch>
<param name="red_box_path" type="str" value="/home/lihuang/ur5_ws/src/ur5_notebook/urdf/red_box.urdf"/>
<param name="red_box_path" type="str" value="/home/haoran/ros_hw/src/ur5_notebook/urdf/red_box.urdf"/>

<arg name="limited" default="true"/>
<arg name="paused" default="false"/>
Expand Down Expand Up @@ -40,7 +40,9 @@

<!-- spawn the conveyor_belt in gazebo -->
<node name="spawn_conveyor_belt" pkg="gazebo_ros" type="spawn_model" args="-file $(find ur5_notebook)/urdf/conveyor_belt.urdf -urdf -model conveyor_belt" />
<!-- the cylinder blocks spawner node -->
<!-- spawn the conveyor_belt in gazebo -->
<node name="bin" pkg="gazebo_ros" type="spawn_model" args="-file $(find ur5_notebook)/urdf/bin.urdf -urdf -model bin -y 0.8 -x -0.5 -z 0.05" />
<!-- the red blocks spawner node -->
<node name="blocks_spawner" pkg="ur5_notebook" type="blocks_spawner" output="screen" />

<!-- the cylinder poses publisher node -->
Expand Down
Loading

0 comments on commit 185fc5f

Please sign in to comment.