mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
updated rtabmap.launch
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<param name="Bayes/PredictionLC" type="string" value="0.1 0.36 0.30 0.16 0.062 0.0151 0.00255 0.00035"/>
|
<param name="Bayes/PredictionLC" type="string" value="0.1 0.36 0.30 0.16 0.062 0.0151 0.00255 0.00035"/>
|
||||||
|
|
||||||
<param name="OptimizerSlam2D" type="string" value="true"/>
|
<param name="Optimizer/Slam2D" type="string" value="true"/>
|
||||||
<param name="Optimizer/Iterations" type="string" value="100"/>
|
<param name="Optimizer/Iterations" type="string" value="100"/>
|
||||||
<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
|
<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
|
||||||
<param name="Optimizer/Strategy" type="string" value="1"/>
|
<param name="Optimizer/Strategy" type="string" value="1"/>
|
||||||
@@ -158,4 +158,4 @@
|
|||||||
<param name="max_obstacles_height" type="double" value="0.4"/>
|
<param name="max_obstacles_height" type="double" value="0.4"/>
|
||||||
</node>
|
</node>
|
||||||
</group>
|
</group>
|
||||||
</launch>
|
</launch>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<arg name="rviz" default="false" />
|
<arg name="rviz" default="false" />
|
||||||
|
|
||||||
<!-- Corresponding config files -->
|
<!-- Corresponding config files -->
|
||||||
<arg name="cfg" default="~/.ros/rtabmap.ini" /> <!-- To change RTAB-Map's parameters, set the path of config file (*.ini) generated by the standalone app -->
|
<arg name="cfg" default="" /> <!-- To change RTAB-Map's parameters, set the path of config file (*.ini) generated by the standalone app -->
|
||||||
<arg name="rviz_cfg" default="-d $(find rtabmap_ros)/launch/config/rgbd.rviz" />
|
<arg name="rviz_cfg" default="-d $(find rtabmap_ros)/launch/config/rgbd.rviz" />
|
||||||
|
|
||||||
<arg name="frame_id" default="camera_link"/> <!-- Fixed frame id, you may set "base_link" or "base_footprint" if they are published -->
|
<arg name="frame_id" default="camera_link"/> <!-- Fixed frame id, you may set "base_link" or "base_footprint" if they are published -->
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
|
|
||||||
<arg name="visual_odometry" default="true"/> <!-- Launch rtabmap visual odometry node -->
|
<arg name="visual_odometry" default="true"/> <!-- Launch rtabmap visual odometry node -->
|
||||||
<arg name="odom_topic" default="/odom"/> <!-- Odometry topic used if visual_odometry is false -->
|
<arg name="odom_topic" default="/odom"/> <!-- Odometry topic used if visual_odometry is false -->
|
||||||
|
<arg name="odom_args" default="$(arg rtabmap_args)"/>
|
||||||
|
|
||||||
<!-- These arguments should not be modified directly, see referred topics without "_relay" suffix above -->
|
<!-- These arguments should not be modified directly, see referred topics without "_relay" suffix above -->
|
||||||
<arg if="$(arg compressed)" name="rgb_topic_relay" default="$(arg rgb_topic)_relay"/>
|
<arg if="$(arg compressed)" name="rgb_topic_relay" default="$(arg rgb_topic)_relay"/>
|
||||||
@@ -79,7 +80,7 @@
|
|||||||
<node if="$(arg compressed)" name="republish_rgb" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg rgb_topic) raw out:=$(arg rgb_topic_relay)" />
|
<node if="$(arg compressed)" name="republish_rgb" type="republish" pkg="image_transport" args="$(arg rgb_image_transport) in:=$(arg rgb_topic) raw out:=$(arg rgb_topic_relay)" />
|
||||||
<node if="$(arg compressed)" name="republish_depth" type="republish" pkg="image_transport" args="compressedDepth in:=$(arg depth_topic) raw out:=$(arg depth_topic_relay)" />
|
<node if="$(arg compressed)" name="republish_depth" type="republish" pkg="image_transport" args="compressedDepth in:=$(arg depth_topic) raw out:=$(arg depth_topic_relay)" />
|
||||||
|
|
||||||
<node if="$(arg visual_odometry)" pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen" args="$(arg rtabmap_args)" launch-prefix="$(arg launch_prefix)">
|
<node if="$(arg visual_odometry)" pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen" args="$(arg odom_args)" launch-prefix="$(arg launch_prefix)">
|
||||||
<remap from="rgb/image" to="$(arg rgb_topic_relay)"/>
|
<remap from="rgb/image" to="$(arg rgb_topic_relay)"/>
|
||||||
<remap from="depth/image" to="$(arg depth_topic_relay)"/>
|
<remap from="depth/image" to="$(arg depth_topic_relay)"/>
|
||||||
<remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
|
<remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
|
||||||
|
|||||||
+2
-1
@@ -726,7 +726,8 @@ Transform CoreWrapper::getTransform(const std::string & fromFrameId, const std::
|
|||||||
//if(!tfBuffer_.canTransform(fromFrameId, toFrameId, stamp, ros::Duration(1)))
|
//if(!tfBuffer_.canTransform(fromFrameId, toFrameId, stamp, ros::Duration(1)))
|
||||||
if(!tfListener_.waitForTransform(fromFrameId, toFrameId, stamp, ros::Duration(waitForTransformDuration_)))
|
if(!tfListener_.waitForTransform(fromFrameId, toFrameId, stamp, ros::Duration(waitForTransformDuration_)))
|
||||||
{
|
{
|
||||||
ROS_WARN("rtabmap: Could not get transform from %s to %s after %f second!", fromFrameId.c_str(), toFrameId.c_str(), waitForTransformDuration_);
|
ROS_WARN("rtabmap: Could not get transform from %s to %s after %f seconds (for stamp=%f)!",
|
||||||
|
fromFrameId.c_str(), toFrameId.c_str(), waitForTransformDuration_, stamp.toSec());
|
||||||
return transform;
|
return transform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
void my_handler(int s){
|
void my_handler(int s){
|
||||||
|
ROS_INFO("rtabmapviz: ctrl-c catched! Exiting Qt app...");
|
||||||
QApplication::exit();
|
QApplication::exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -493,7 +493,8 @@ Transform GuiWrapper::getTransform(const std::string & fromFrameId, const std::s
|
|||||||
//if(!tfBuffer_.canTransform(fromFrameId, toFrameId, stamp, ros::Duration(1)))
|
//if(!tfBuffer_.canTransform(fromFrameId, toFrameId, stamp, ros::Duration(1)))
|
||||||
if(!tfListener_.waitForTransform(fromFrameId, toFrameId, stamp, ros::Duration(waitForTransformDuration_)))
|
if(!tfListener_.waitForTransform(fromFrameId, toFrameId, stamp, ros::Duration(waitForTransformDuration_)))
|
||||||
{
|
{
|
||||||
ROS_WARN("rtabmapviz: Could not get transform from %s to %s after %f seconds!", fromFrameId.c_str(), toFrameId.c_str(), waitForTransformDuration_);
|
ROS_WARN("rtabmapviz: Could not get transform from %s to %s after %f seconds (for stamp=%f)!",
|
||||||
|
fromFrameId.c_str(), toFrameId.c_str(), waitForTransformDuration_, stamp.toSec());
|
||||||
return transform;
|
return transform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user