Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinetic: segbot simulation not working #93

Closed
jack-oquin opened this issue Sep 12, 2017 · 15 comments
Closed

Kinetic: segbot simulation not working #93

jack-oquin opened this issue Sep 12, 2017 · 15 comments

Comments

@jack-oquin
Copy link
Member

There seem to be several problems, including utexas-bwi/bwi_common#95.

ref: utexas-bwi/bwi#49

@jack-oquin
Copy link
Member Author

jack-oquin commented Oct 24, 2017

The goal is that we should be able to check out the BWI software on Ubuntu Xenial with ROS Kinetic installed, create and build a workspace in the usual manner, then run the Gazebo simulation in the usual way:

roslaunch bwi_launch simulation.launch

or

roslaunch bwi_launch simulation_v3.launch

To start with, the v3 simulation is probably more important.

@jack-oquin
Copy link
Member Author

There are several problems:

  • some rosdep dependencies do not exist yet, so none are resolved automatically

This makes it hard to resolve the ones actually needed, resulting in tedious repeated builds followed by installing things that turn up missing.

  • The Gazebo version 7 in Kinetic does launch, but is not completely compatible with our code base.

@jack-oquin
Copy link
Member Author

On launch, there is a xacro warning:

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
deprecated: xacro tags should be prepended with 'xacro' xml namespace.
Use the following script to fix incorrect usage:
        find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'
when processing file: /home/joq/ros/ws/src/segbot/segbot_description/robots/segbot_v2.urdf.xacro

xacro.py is deprecated; please use xacro instead

@jack-oquin
Copy link
Member Author

jack-oquin commented Oct 24, 2017

There are still references to segbot_gui in several launch scripts.

xref: utexas-bwi/bwi_common#95

@piyushk: I thought that package was deprecated and replaced by bwi_rqt_plugins?

@jack-oquin
Copy link
Member Author

Another simulation_v3.launch startup errors:

[ERROR] [1508861507.408824007, 0.001000000]: GazeboRosDiffDrive Plugin missing <legacyMode>, defaults to true
This setting assumes you have a old package, where the right and left wheel are changed to fix a former code issue
To get rid of this error just set <legacyMode> to false if you just created a new package.
To fix an old package you have to exchange left wheel by the right wheel.
If you do not want to fix this issue in an old package or your z axis points down instead of the ROS standard defined in REP 103
just set <legacyMode> to true.

@jack-oquin
Copy link
Member Author

Some missing exec-time dependencies:

sudo apt-get install ros-kinetic-velodyne-description ros-kinetic-pointcloud-to-laserscan

jack-oquin added a commit to utexas-bwi/bwi that referenced this issue Oct 24, 2017
jack-oquin added a commit to utexas-bwi/bwi_common that referenced this issue Oct 24, 2017
@jack-oquin
Copy link
Member Author

[hokuyo_laser_filters-23] process has died [pid 30238, exit code -11, cmd /opt/ros/kinetic/lib/laser_filters/scan_to_scan_filter_chain __name:=hokuyo_laser_filters __log:=/home/users/joq/.ros/log/e0f5bb4e-b8eb-11e7-a224-d05099af6e6d/hokuyo_laser_filters-23.log].
log file: /home/users/joq/.ros/log/e0f5bb4e-b8eb-11e7-a224-d05099af6e6d/hokuyo_laser_filters-23*.log

@jack-oquin
Copy link
Member Author

There are lots of TF warnings, like this:

[ WARN] [1508870905.983008781]: Timed out waiting for transform from base_footprint to level_mux/map to become available before running costmap, tf error: Could not find a connection between 'level_mux/map' and 'base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.100776 timeout was 0.1.

I suspect that the root problem is that TF frame IDs containing an internal '/' are no longer supported. The slash is only supported between the $tf_prefix and the frame name. So, level_mux/map needs to be changed to something like level_mux_map.

@jack-oquin
Copy link
Member Author

$ grep -R level_mux/map .
./segbot/segbot_logical_translator/src/libsegbot_logical_translator/segbot_logical_translator.cpp:    ros::param::param<std::string>("~global_frame_id", global_frame_id_, "level_mux/map");
./segbot/segbot_navigation/rviz/nav_eband_marvin.rviz:      Topic: /marvin/level_mux/map
./segbot/segbot_navigation/rviz/nav_eband_marvin.rviz:    Fixed Frame: marvin/level_mux/map
./bwi_common/multi_level_map_utils/nodes/level_mux:        self.global_frame_id = rospy.get_param('~global_frame_id', 'level_mux/map')
./bwi_common/bwi_scavenger/src/SearchPlanner.cpp:        tmp_pose.header.frame_id = "level_mux/map";
./bwi_common/bwi_scavenger/src/SearchPlanner.cpp:        srv.request.start.header.frame_id = "level_mux/map"; 
./bwi_common/bwi_scavenger/src/SearchPlanner.cpp:        srv.request.goal.header.frame_id = "level_mux/map"; 
./bwi_common/bwi_scavenger/src/SearchPlanner.cpp:    nextScene.header.frame_id = "level_mux/map";
./bwi_common/bwi_scavenger/src/ScavTaskHumanFollowing.cpp:        human_pose.header.frame_id = "level_mux/map";
./bwi_common/bwi_scavenger/trajectory/draw_trajectory.cpp:    robot_line_strip.header.frame_id = human_line_strip.header.frame_id = "level_mux/map";
./bwi_common/bwi_scavenger/trajectory/draw_trajectory.cpp:    text_view_facing.header.frame_id = "level_mux/map";
./bwi/bwi_launch/launch/includes/simulation.launch.xml:    <param name="global_frame_id" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation.launch.xml:    <arg name="map_frame" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation.launch.xml:    <arg name="map_topic" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation.launch.xml:    <param name="global_frame_id" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot_ns.launch.xml:      <param name="global_frame_id" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot_ns.launch.xml:      <arg name="map_topic" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot_ns.launch.xml:      <arg name="map_frame_id" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot_ns.launch.xml:      <arg name="global_frame" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot_ns.launch.xml:      <param name="global_frame_id" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation_ns.launch.xml:      <param name="global_frame_id" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation_ns.launch.xml:      <arg name="map_frame" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation_ns.launch.xml:      <arg name="map_topic" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/simulation_ns.launch.xml:      <param name="global_frame_id" value="$(arg ns)/level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot.launch.xml:    <param name="global_frame_id" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot.launch.xml:    <arg name="map_topic" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot.launch.xml:    <arg name="map_frame_id" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot.launch.xml:    <arg name="global_frame" value="level_mux/map" />
./bwi/bwi_launch/launch/includes/segbot.launch.xml:    <param name="global_frame_id" value="level_mux/map" />

@jack-oquin
Copy link
Member Author

Changed many uses of level_mux/map frame ID to level_mux_map. Still didn't get everything:

[ WARN] [1510685914.195860501, 14.849000000]: Frame_id of map received:'3rdFloor/map' doesn't match global_frame_id:'/level_mux_map;'. This could cause issues with reading published topics
[ INFO] [1510685914.248802964, 14.990000000]: Initializing likelihood field model; this can take some time on large maps...
[ WARN] [1510685914.314696035, 15.105000000]: Timed out waiting for transform from base_footprint to level_mux_map to become available before running costmap, tf error: Could not find a connection between 'level_mux_map' and 'base_footprint' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.105 timeout was 0.1.

@jack-oquin
Copy link
Member Author

The 3rdFloor/map frame ID seems to be constructed somewhere based on the floor names in the utexas_gdc/maps YAML files.

Looks like that's happening in the multi_level_map_utils C++ library.

@jack-oquin
Copy link
Member Author

That fix does not work. It's not clear that C++ library is even being used any more.

@jack-oquin
Copy link
Member Author

It's working today on my computer. Maybe I was doing something wrong last week. I cleaned my catkin workspace here.

@jack-oquin
Copy link
Member Author

Thanks to help from Yuqian, Ricardo, Garrett and Shih-Yun, we can now checkout the Kinetic rosinstall for BWI, resolve the dependencies, build everything and run visit door list in the simulator.

@jack-oquin
Copy link
Member Author

This is working now, if you follow the install and build directions carefully, and use up-to-date Kinetic packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant