Commit 0a8d56d9 authored by dla.adolfsson@gmail.com's avatar dla.adolfsson@gmail.com
Browse files

changed robot

parent bbde3552
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<arg name="run_bag" default="false" /> <arg name="run_bag" default="false" />
<!-- Absolute Path to map to be used for localization. The map needs to be built by graph_fuser package --> <!-- Absolute Path to map to be used for localization. The map needs to be built by graph_fuser package -->
<arg name="map_file_path" default="$(find graph_map)/maps/ndt_map.MAP" /> <arg name="map_file_path" default="$(find graph_map)/maps/ndt_map.MAP" />
<arg name="robot_prefix" default="robot4" /> <arg name="robot_prefix" default="robot5" />
<arg name="rviz_enabled" default="false" /> <arg name="rviz_enabled" default="false" />
<arg name="use_sim_time" value="true"/>
<!-- Include visualization in rviz --> <!-- Include visualization in rviz -->
<group if="$(arg rviz_enabled)"> <group if="$(arg rviz_enabled)">
<include file="$(find graph_map)/launch/visualize_graph_fuser.launch" > <include file="$(find graph_map)/launch/visualize_graph_fuser.launch" >
...@@ -52,8 +52,7 @@ ...@@ -52,8 +52,7 @@
<!--param name="mcl_tf" value="mcl_pose_est" /--> <!--param name="mcl_tf" value="mcl_pose_est" /-->
<!-- MCL parameters --> <!-- MCL parameters -->
<param name="enable_localisation" value="true" /> <param name="enable_localisation" value="true" />
<param name="resolution_local_factor" value="1.3" /> <param name="resolution_local_factor" value="1.3" />
<param name="particle_count" value="500" /> <param name="particle_count" value="500" />
...@@ -63,15 +62,15 @@ ...@@ -63,15 +62,15 @@
<param name="z_filter_height" value="1.0" /> <param name="z_filter_height" value="1.0" />
</node> </node>
<node name="occupancy_map_server" pkg="map_server" type="map_server" args=" $(find graph_map)/maps/occupancy_map.yaml" output="screen"/> <node name="occupancy_map_server" pkg="map_server" type="map_server" args=" $(find graph_map)/maps/occupancy_map.yaml" output="screen"/> <!--frame_id map_velodyne-->
<group if="$(arg rviz_enabled)"> <group if="$(arg rviz_enabled)">
<node name="graph_map_publisher" pkg="graph_map" type="graph_map_publisher" output="screen"> <node name="graph_map_publisher" pkg="graph_map" type="graph_map_publisher" output="screen">
<param name="map_rate" value="1" /> <param name="map_rate" value="1" />
<param name="map_file" value="$(arg map_file_path)" /> <param name="map_file" value="$(arg map_file_path)" />
<param name="map_frame" value="/maps/map_2d_laser" /> <param name="map_frame" value="/maps/map_laser2d" />
<param name="map_parent_frame_id" value="/world" /> <param name="map_parent_frame_id" value="/world" />
<param name="map_topic" value="/maps/map_2d_laser" /> <param name="map_topic" value="/maps/map_laser2d" />
</node> </node>
</group> </group>
...@@ -80,7 +79,7 @@ ...@@ -80,7 +79,7 @@
<arg name="file_1" default="2018-05-18-09-55-16.bag" /> <arg name="file_1" default="2018-05-18-09-55-16.bag" />
<node pkg="rosbag" type="play" name="player" output="screen" args="--clock -r 1.0 -q $(arg path)$(arg file_1)"/> <node pkg="rosbag" type="play" name="player" output="screen" args="--clock -r 1.0 -q $(arg path)$(arg file_1)"/>
</group> </group>
<node pkg="tf" type="static_transform_publisher" name="velodyne_map_static_broadcaster" args="0 0 0 0 0 0 world map_velodyne 100" /> <node pkg="tf" type="static_transform_publisher" name="velodyne_map_static_broadcaster" args="0 0 0 0 0 0 world map_velodyne 100"/>
<node pkg="tf" type="static_transform_publisher" name="occupancy_map_static_broadcaster" args="0 0 0 0 0 0 world map 100" /> <node pkg="tf" type="static_transform_publisher" name="occupancy_map_static_broadcaster" args="0 0 0 0 0 0 world map 100"/>
</launch> </launch>
...@@ -14,6 +14,7 @@ Panels: ...@@ -14,6 +14,7 @@ Panels:
- /Odometry4/Shape1 - /Odometry4/Shape1
- /PointCloud21 - /PointCloud21
- /PointCloud21/Autocompute Value Bounds1 - /PointCloud21/Autocompute Value Bounds1
- /Map1
Splitter Ratio: 0.5 Splitter Ratio: 0.5
Tree Height: 815 Tree Height: 815
- Class: rviz/Selection - Class: rviz/Selection
...@@ -64,8 +65,6 @@ Visualization Manager: ...@@ -64,8 +65,6 @@ Visualization Manager:
All Enabled: false All Enabled: false
map: map:
Value: true Value: true
map_velodyne:
Value: true
robot4/base_footprint: robot4/base_footprint:
Value: true Value: true
robot4/base_fork: robot4/base_fork:
...@@ -133,10 +132,6 @@ Visualization Manager: ...@@ -133,10 +132,6 @@ Visualization Manager:
Show Names: true Show Names: true
Tree: Tree:
world: world:
map:
{}
map_velodyne:
{}
robot4/odom: robot4/odom:
robot4/base_footprint: robot4/base_footprint:
robot4/base_link: robot4/base_link:
...@@ -337,7 +332,7 @@ Visualization Manager: ...@@ -337,7 +332,7 @@ Visualization Manager:
Topic: /ndt_mcl_pose Topic: /ndt_mcl_pose
Unreliable: false Unreliable: false
Value: true Value: true
- Alpha: 0.800000012 - Alpha: 1
Autocompute Intensity Bounds: true Autocompute Intensity Bounds: true
Autocompute Value Bounds: Autocompute Value Bounds:
Max Value: 5.9265604 Max Value: 5.9265604
...@@ -348,7 +343,7 @@ Visualization Manager: ...@@ -348,7 +343,7 @@ Visualization Manager:
Class: rviz/PointCloud2 Class: rviz/PointCloud2
Color: 255; 255; 255 Color: 255; 255; 255
Color Transformer: AxisColor Color Transformer: AxisColor
Decay Time: 10 Decay Time: 0
Enabled: true Enabled: true
Invert Rainbow: false Invert Rainbow: false
Max Color: 255; 255; 255 Max Color: 255; 255; 255
...@@ -359,7 +354,7 @@ Visualization Manager: ...@@ -359,7 +354,7 @@ Visualization Manager:
Position Transformer: XYZ Position Transformer: XYZ
Queue Size: 10 Queue Size: 10
Selectable: true Selectable: true
Size (Pixels): 1 Size (Pixels): 3
Size (m): 0.0500000007 Size (m): 0.0500000007
Style: Points Style: Points
Topic: /cloud_localized Topic: /cloud_localized
...@@ -411,25 +406,25 @@ Visualization Manager: ...@@ -411,25 +406,25 @@ Visualization Manager:
Views: Views:
Current: Current:
Class: rviz/XYOrbit Class: rviz/XYOrbit
Distance: 18.1015873 Distance: 22.5021648
Enable Stereo Rendering: Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987 Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1 Stereo Focal Distance: 1
Swap Stereo Eyes: false Swap Stereo Eyes: false
Value: false Value: false
Focal Point: Focal Point:
X: -3.50539112 X: 0.926601827
Y: -25.8522511 Y: -2.5325017
Z: 5.3598078e-06 Z: 3.01108912e-06
Focal Shape Fixed Size: false Focal Shape Fixed Size: false
Focal Shape Size: 0.0500000007 Focal Shape Size: 0.0500000007
Invert Z Axis: false Invert Z Axis: false
Name: Current View Name: Current View
Near Clip Distance: 0.00999999978 Near Clip Distance: 0.00999999978
Pitch: -0.0452038944 Pitch: 1.06479573
Target Frame: world Target Frame: world
Value: XYOrbit (rviz) Value: XYOrbit (rviz)
Yaw: 0.784042537 Yaw: 0.494042486
Saved: Saved:
- Class: rviz/Orbit - Class: rviz/Orbit
Distance: 39.1665726 Distance: 39.1665726
......
...@@ -235,16 +235,15 @@ class localisation_node { ...@@ -235,16 +235,15 @@ class localisation_node {
Initialize(pose_init_geom, ts); Initialize(pose_init_geom, ts);
} }
tf::StampedTransform transform; tf::StampedTransform transform;
double x, y, yaw; //double x, y, yaw;
tf_listener.waitForTransform(odomTF, baseTF, ts, ros::Duration(0.1)); tf_listener.waitForTransform(odomTF, baseTF, ts, ros::Duration(0.1));
try{ try{
tf_listener.lookupTransform(odomTF, baseTF,/*ros::Time(0)*/ts, transform); tf_listener.lookupTransform(odomTF, baseTF,/*ros::Time(0)*/ts, transform);
yaw = tf::getYaw(transform.getRotation()); /* yaw = tf::getYaw(transform.getRotation());
x = transform.getOrigin().x(); x = transform.getOrigin().x();
y = transform.getOrigin().y(); y = transform.getOrigin().y();*/
} }
catch(tf::TransformException ex){ catch(tf::TransformException ex){
ROS_ERROR("%s", ex.what()); ROS_ERROR("%s", ex.what());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment