Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrceki committed Mar 2, 2023
1 parent 5a69add commit 5ac5ec1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
4 changes: 2 additions & 2 deletions air_moveit_config/launch/demo_ros_control.launch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<arg name="controller" default="fake" />
<arg name="moveit_controller_manager" value="$(arg controller)"/>

<param name="robot_description" textfile="$(find air_description)/urdf/air.urdf" />
<!--param name="robot_description" textfile="$(find air_description)/urdf/air.urdf" /-->

<!-- Given the published joint states, publish tf for the robot links -->
<group if="$(eval arg('moveit_controller_manager') == 'ros_control')">
Expand All @@ -17,7 +17,7 @@

<include file="$(dirname)/demo.launch" pass_all_args="true">
<!-- robot description is loaded by gazebo.launch, to enable Gazebo features -->
<arg name="load_robot_description" value="false" />
<arg name="load_robot_description" value="true" />
<arg name="moveit_controller_manager" value="$(arg moveit_controller_manager)"/>
</include>
</launch>
2 changes: 1 addition & 1 deletion air_moveit_config/launch/planning_context.launch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<!-- Load updated joint limits (override information from URDF) -->
<group ns="$(arg robot_description)_planning">
<!--param name="shape_transform_cache_lookup_wait_time" value="0.1" /-->
<param name="shape_transform_cache_lookup_wait_time" value="0.2" />
<rosparam command="load" file="$(find air_moveit_config)/config/joint_limits.yaml"/>
<rosparam command="load" file="$(find air_moveit_config)/config/cartesian_limits.yaml"/>
</group>
Expand Down
25 changes: 16 additions & 9 deletions air_moveit_config/src/pick_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,32 @@ void air_pick::pick(){

move_group->setPlanningTime(45.0);
geometry_msgs::Pose pick_pose, place_pose;
geometry_msgs::PoseStamped current_pose;
//geometry_msgs::PoseStamped current_pose;

ROS_INFO("Object Pose: x= %f, y= %f, z= %f ",m_x,m_y,m_z);

// Pick Pose
current_pose = move_group->getCurrentPose("tool0");
pick_pose.position.x = m_x;
pick_pose.position.y = m_y;
pick_pose.position.z = m_z + 0.05;
pick_pose.orientation = current_pose.pose.orientation;

//current_pose = move_group->getCurrentPose("tool0");
pick_pose.position.x = 0.63;//m_x;
pick_pose.position.y = 0.2;//m_y;
pick_pose.position.z = 0.85;//m_z + 0.05;
pick_pose.orientation.w = 0.5;
pick_pose.orientation.x = -0.5;
pick_pose.orientation.y = 0.5;
pick_pose.orientation.z = -0.5;
ROS_INFO("POSE GENERATED");
// Place Pose
place_pose.position.x = m_x;
place_pose.position.y = m_y + 0,05;
place_pose.position.z = m_z + 0.1;
move_group->setPoseTarget(pick_pose);
ROS_INFO("POSE TARGET SETTED");

// Plan and execute the pick motion
moveit::planning_interface::MoveGroupInterface::Plan plan;
moveit::planning_interface::MoveItErrorCode result = move_group->plan(plan);

ROS_INFO("PLANNED");

if (result == moveit::planning_interface::MoveItErrorCode::SUCCESS)
{
move_group->execute(plan);
Expand Down Expand Up @@ -77,9 +82,11 @@ void air_pick::planningSceneWorldCallback(const moveit_msgs::PlanningScene::Cons

int main(int argc, char** argv)
{

ros::init(argc, argv, "pick_and_place");

ros::NodeHandle nh;
air_pick obj(nh);
ros::spinOnce();
ros::spin();
return 0;
}
11 changes: 7 additions & 4 deletions realsense-ros/realsense2_camera/launch/rs_camera.launch
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<launch>

<arg name="serial_no" default=""/>
<arg name="usb_port_id" default=""/>
<arg name="device_type" default=""/>
Expand All @@ -8,7 +9,7 @@
<arg name="external_manager" default="false"/>
<arg name="manager" default="realsense2_camera_manager"/>
<arg name="output" default="screen"/>
<arg name="respawn" default="false"/>
<arg name="respawn" default="false"/>

<arg name="fisheye_width" default="640"/>
<arg name="fisheye_height" default="480"/>
Expand Down Expand Up @@ -55,7 +56,7 @@
<arg name="publish_tf" default="true"/>
<arg name="tf_publish_rate" default="0"/>

<arg name="filters" default=""/>
<arg name="filters" default="pointcloud"/>
<arg name="clip_distance" default="-2"/>
<arg name="linear_accel_cov" default="0.01"/>
<arg name="initial_reset" default="true"/>
Expand All @@ -66,11 +67,13 @@
<arg name="calib_odom_file" default=""/>
<arg name="publish_odom_tf" default="false"/>

<arg name="stereo_module/exposure/1" default="7500"/>true
<arg name="stereo_module/exposure/1" default="7500"/>
<arg name="stereo_module/gain/1" default="16"/>
<arg name="stereo_module/exposure/2" default="1"/>
<arg name="stereo_module/gain/2" default="16"/>

<param name="/camera/motion_module/global_time_enabled" type="bool" value="true"/>
<param name="/camera/l500_depth_sensor/global_time_enabled" type="bool" value="true"/>
<param name="/camera/rgb_camera/global_time_enabled" type="bool" value="true"/>


<group ns="$(arg camera)">
Expand Down

0 comments on commit 5ac5ec1

Please sign in to comment.