I created a node to map the turtlebot3_world, since in turtlebot3_world.launch there is no map frame, i assigned map_msg.header.frame_id = "odom"inside my code. now i am going to use the created map for localization, I stuck all together in below launch file. the problem is with the origin of the map, although i set the origin of map at [-3,-3,0] it is located at [0,0,0] in rviz and never change, as well as there is another error in rviz ,"No transform from [map] to [odom]" (see the photo below). how can i handle these issues?
thanks in advance.
<launch>
<arg name="my_map" default="$(find robot_laser_grid_mapping)/maps/map.yaml"/>
<node pkg="just_for_learning" type="pointstamp.py" name="position_tracker">
<param name="map_file" value="$(find robot_laser_grid_mapping)/maps/map.yaml" />
</node>
<node pkg="map_server" type="map_server" name="map_server" args="$(arg my_map)"/>
<node pkg="teleoperat1" type="key_to_twist.py" name="keys_to_twist" ></node>
<node pkg="teleoperat1" type="keyboard_drive.py" name="keyboard_driver" ></node>
<include file="$(find turtlebot3_gazebo)/launch/turtlebot3_world.launch" ></include>
<include file="$(find turtlebot3_bringup)/launch/turtlebot3_model.launch"></include>
</launch>
rviz environment
Related
I'm trying to do an AMCL localization for a pre-created map. AMCL should take laserScan played back from .bag file (containing 2 lasers that are combined into /scan_multi). Issue is that AMCL doesn't seem to do anything, even though odometry works and TF tree should be linked correctly.
Tried also for different initial positions specified from launch file, all of which are correctly represented on map in rviz.
Parts of my launch file that might be relevant:
<arg name="map_file" default="$(find project2)/map/map.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0.0 0.0 0.0 /map /odom 40" />
<node pkg="tf" type="static_transform_publisher" name="odom_to_base_footprint" args="0.0 0.0 0.0 0.0 0.0 0.0 /odom /base_footprint 40" />
<node pkg="tf" type="static_transform_publisher" name="base_footprint_base_link" args="0.0 0.0 0.0 0.0 0.0 0.0 /base_footprint /base_link 40" />
<arg name="scan_topic" default="scan"/>
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<node pkg="amcl" type="amcl" name="amcl">
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="odom_frame_id" value="odom"/>
<param name="base_frame_id" value="base_footprint"/>
<param name="frame_id" value="base_link"/>
<param name="map_frame_id" value="map"/>
<param name="use_map_topic" value="true"/>
<remap from="map" to="/map"/>
<remap from="scan" to="scan_multi"/>
</node>
Structure of TF tree: /map -> /odom -> /base_footprint -> /base_link -> /laser front
I tried using roswtf, got only 1 warning:
The following node subscriptions are unconnected: * /rviz: * /map_updates
Follow here for the whole project: https://drive.google.com/file/d/1AQz4...
Thanks for any help!
Deleting all static transforms from the .launch file and replacing them with a dynamic one between /odom and /base_footprint solved the issue. You can directly use the node from the src folder:
<node pkg="project2" name="odom_tf" respawn="false" type="odom_tf" output="screen"/>
I am using the code [here][1] which have sensor_msgs::pointcloud. Can someone help me how to convert it to sensor_msgs::pointcloud2
[1]: https://github.com/Vidicon/2dscantoPointcloud/blob/master/src/lidar_transform.cpp
This code is quite old and you shouldn't really be using PointCloud messages now. That being said, you can run the pointcloud_converter node to get your message out as a PointCloud2. Take this launch file for example:
<launch>
</node name="pointcloud_converter" type="point_cloud_converter" pkg="point_cloud_converter">
<remap from="points_in" to="/your_topic" />
<remap from="points_out" to="/your_output_topic" />
</node>
</launch>
You could use the method convertPointCloudToPointCloud2 from point_cloud_conversion.hpp
Im checking the hector_localization stack, that provide the full 6DOF pose of a robot or platform. It uses various sensor sources, which are fused using an Extended Kalman filter. Acceleration and angular rates from an inertial measurement unit (IMU) serve as primary measurements and also support barometric pressure sensors. I check the launch which is this one
<?xml version="1.0"?>
<launch>
<node pkg="hector_pose_estimation" type="pose_estimation" name="hector_pose_estimation" />
<node pkg="rviz" type="rviz" name="hector_pose_estimation_rviz" args="-d $(find hector_pose_estimation)/rviz_cfg/hector_pose_estimation.rviz" />
</launch>
But can not find the way hot to set up the hector_pose_estimation node and the launch file to get IMU and Pressure (barometer) data as input. Any help?
Thanks
You have to remap the input topics hector is expecting to the topics you're systems are outputting. Check this page for a full list of topics and params. In the end your launch file should look something like this. Note you need to put in your own topic names.
<?xml version="1.0"?>
<launch>
<node pkg="hector_pose_estimation" type="pose_estimation" name="hector_pose_estimation">
<remap from="raw_imu" to="/your_imu_topic" />
<remap from="pressure_height" to="/your_barometric_topic" />
</node>
<node pkg="rviz" type="rviz" name="hector_pose_estimation_rviz" args="-d $(find hector_pose_estimation)/rviz_cfg/hector_pose_estimation.rviz" />
</launch>
Im using this robot_lokalization package for the linear velocity. As only sensor input in my case is IMU. I configure the parameters and set the frames as follow
map_frame: map
odom_frame: odom
base_link_frame: /thrbot/base_link
world_frame: odom
The launch file is the following one
<launch>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
<rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml" />
<param name="odom_used" value="false"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_imu" args="0 0 0 0 0 0 /thrbot/base_link /thrbot/imu_link 100" />
</launch>
The robot base_link frame is thrbot/base_link the IMU is thrbot/imu_link
Here is the photo of the TF without using the package
. As can see TF is good. But when using the package my TF is broken as can see here . Any help how to fix it?
Thanks
I have been trying to make viso2_ros work with intel realsense r200. But there is a problem with the synchronisation(I think) and viso2_ros is not getting any image data. I get the following warning:
Following is my launch file:
<launch>
<arg name="camera" default="stereo_forward"/> <node ns="$(arg camera)" pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc"/> --> <node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer" output="screen">
<remap from ="stereo" to="$(arg camera)"/>
<remap from="image" to="image_rect"/>
<remap from="/$(arg camera)/left/image_rect" to="/camera/ir/image_raw"/>
<remap from="/$(arg camera)/left/camera_info" to="/camera/ir/camera_info"/>
<remap from="/$(arg camera)/right/image_rect" to="/camera/ir2/image_raw"/>
<remap from="/$(arg camera)/right/camera_info" to="/camera/ir2/camera_info"/>
<remap from="odom" to="/stereo_odometer/odometry"/>
<param name="queue_size" type="int" value="100"/>
<param name="approximate_sync" type="bool" value="true"/>
<param name="base_link_frame_id" value="$(arg camera)"/>
<param name="odom_frame_id" value="/odom"/>
</node>
</launch>
The rqt_graph:
which does not show a connection for /stereo_forward/right/image_rect. I am using Ubuntu 16.04 with ROS Kinetic. If anyone has any idea or suggestion about a resolution, I would really appreciate that. Thanks in advance!
From a quick google search it looks like Intel R200 only has 1 RGB camera. So I think you'd have to use monocular VO.