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

if the slam_gmapping can run in ros2 Dashing? #1

Open
WangFengtu1996 opened this issue Dec 19, 2019 · 8 comments
Open

if the slam_gmapping can run in ros2 Dashing? #1

WangFengtu1996 opened this issue Dec 19, 2019 · 8 comments

Comments

@WangFengtu1996
Copy link

I installed docker,then i pull the ros: dashing-ros-base. Then, I download the source code from github.
When i execute ros2 launch slam_gmapping slam_gmapping.launch.py ,but i got malformed launch argument 'slam_gmapping.launch.py', expected format ':=' .
So, I want to know if the slam_gampping can run in ros2 Dashing?
if can ,how should i do
thanks for your help.

@WangFengtu1996
Copy link
Author

Then, I execute ros2 launch slam_gmapping slam_gmapping.launch.py in ros2 crystal installed in docker. But I got malformed launch argument 'slam_gmapping.launch.py', expected format ':='
So , how should i do ?
Thanks for your time.

@shiveshkhaitan
Copy link
Member

slam_gmapping should work on both crystal and dashing. It works fine with both source built and debian packages. Are you supplying any additional arguments after the command?

ros2 launch slam_gmapping slam_gmapping.launch.py

There should not be any additional arguments provided.

@WangFengtu1996
Copy link
Author

Thanks for your time.
NO, I just execute the command.

ros2 launch slam_gmapping slam_gmapping.launch.py

but I got

malformed launch argument 'slam_gmapping.launch.py', expected format '<name>:=<value>'

I don't konw what I should do .

@shiveshkhaitan
Copy link
Member

The launch file currently just runs the node slam_gmapping.

Can you try ros2 run slam_gmapping slam_gmapping?

@WangFengtu1996
Copy link
Author

Thanks for you time. but it does not work .
can't find slam_gmapping

@shiveshkhaitan
Copy link
Member

This error should come up only if:

  • either the package is not built
  • or the workspace is not sourced

@WangFengtu1996
Copy link
Author

Thanks for your time.
Yes,I did not build the package.
But, when I execute ros2 launch slam_gmapping slam_gmapping.launch.py,
I got the error
undefined symbol: _ZN7tf2_ros20TransformBroadcaster13sendTransformERKN13geometry_msgs3msg17TransformStamped_ISaIvEEE
When I execute
ros2 run slam_gmapping slam_gmapping
I also got
undefined symbol: _ZN7tf2_ros20TransformBroadcaster13sendTransformERKN13geometry_msgs3msg17TransformStamped_ISaIvEEE

I want to know the error because of the building warning.
`Starting >>> openslam_gmapping
Finished <<< openslam_gmapping [6.65s]
Starting >>> slam_gmapping
--- stderr: slam_gmapping
In file included from /opt/ros/dashing/include/tf2/utils.h:20:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:41,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/opt/ros/dashing/include/tf2/impl/utils.h:114:2: warning: extra ‘;’ [-Wpedantic]
};
^
/opt/ros/dashing/include/tf2/impl/utils.h:148:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:9:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/particlefilter/particlefilter.h: In function ‘void rle(OutputIterator&, const Iterator&, const Iterator&)’:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/particlefilter/particlefilter.h:140:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (count>0)
^~
/root/ros2_ws/install/openslam_gmapping/include/gmapping/particlefilter/particlefilter.h:142:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
out++;
^~~
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:10:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/utils/point.h: At global scope:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/utils/point.h:205:2: warning: extra ‘;’ [-Wpedantic]
}; //end namespace
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_base/sensorreading.h:4:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:6,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_base/sensor.h:21:2: warning: extra ‘;’ [-Wpedantic]
}; //end namespace
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:6:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_base/sensorreading.h:23:2: warning: extra ‘;’ [-Wpedantic]
}; //end namespace
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:7:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_odometry/odometrysensor.h:17:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:8:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_range/rangesensor.h:33:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:9:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_odometry/odometryreading.h:27:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:10:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/sensor/sensor_range/rangereading.h:24:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:11:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/log/configuration.h:15:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:12:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/log/sensorlog.h:27:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/map.h:5:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:3,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/accessstate.h:6:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/map.h:6:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:3,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/array2d.h:185:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:3:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/map.h:262:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/harray2d.h:5:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:4,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/utils/autoptr.h:96:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:4:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/grid/harray2d.h:197:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:5:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/smmap.h:52:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:7:0,
from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/utils/stat.h:145:2: warning: extra ‘;’ [-Wpedantic]
}; //end namespace
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:15:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/scanmatcher/scanmatcher.h:250:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:16:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/motionmodel.h:17:2: warning: extra ‘;’ [-Wpedantic]
};
^
In file included from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:45:0,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/root/ros2_ws/install/openslam_gmapping/include/gmapping/gridfastslam/gridslamprocessor.h:335:2: warning: extra ‘;’ [-Wpedantic]
};
^
/root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp: In member function ‘void SlamGmapping::startLiveSlam()’:
/root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:95:82: warning: ‘std::shared_ptr rclcpp::Node::create_publisher(const string&, const rmw_qos_profile_t&, std::shared_ptr<Up>) [with MessageT = std_msgs::msg::Float64<std::allocator >; AllocatorT = std::allocator; PublisherT = rclcpp::Publisher<std_msgs::msg::Float64_<std::allocator > >; std::__cxx11::string = std::cxx11::basic_string; rmw_qos_profile_t = rmw_qos_profile_t]’ is deprecated: use create_publisher(const std::string &, const rclcpp::QoS &, ...) instead [-Wdeprecated-declarations]
entropy_publisher
= this->create_publisher<std_msgs::msg::Float64>("entropy");
^
In file included from /opt/ros/dashing/include/rclcpp/node.hpp:1206:0,
from /opt/ros/dashing/include/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/dashing/include/rclcpp/executors.hpp:22,
from /opt/ros/dashing/include/rclcpp/rclcpp.hpp:144,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:30,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/opt/ros/dashing/include/rclcpp/node_impl.hpp:96:1: note: declared here
Node::create_publisher(
^~~~
/root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:96:70: warning: ‘std::shared_ptr rclcpp::Node::create_publisher(const string&, const rmw_qos_profile_t&, std::shared_ptr<Up>) [with MessageT = nav_msgs::msg::OccupancyGrid<std::allocator >; AllocatorT = std::allocator; PublisherT = rclcpp::Publisher<nav_msgs::msg::OccupancyGrid
<std::allocator > >; std::__cxx11::string = std::cxx11::basic_string; rmw_qos_profile_t = rmw_qos_profile_t]’ is deprecated: use create_publisher(const std::string &, const rclcpp::QoS &, ...) instead [-Wdeprecated-declarations]
sst
= this->create_publisher<nav_msgs::msg::OccupancyGrid>("map");
^
In file included from /opt/ros/dashing/include/rclcpp/node.hpp:1206:0,
from /opt/ros/dashing/include/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/dashing/include/rclcpp/executors.hpp:22,
from /opt/ros/dashing/include/rclcpp/rclcpp.hpp:144,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:30,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/opt/ros/dashing/include/rclcpp/node_impl.hpp:96:1: note: declared here
Node::create_publisher(
^~~~
/root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:97:78: warning: ‘std::shared_ptr rclcpp::Node::create_publisher(const string&, const rmw_qos_profile_t&, std::shared_ptr<Up>) [with MessageT = nav_msgs::msg::MapMetaData<std::allocator >; AllocatorT = std::allocator; PublisherT = rclcpp::Publisher<nav_msgs::msg::MapMetaData
<std::allocator > >; std::__cxx11::string = std::_cxx11::basic_string; rmw_qos_profile_t = rmw_qos_profile_t]’ is deprecated: use create_publisher(const std::string &, const rclcpp::QoS &, ...) instead [-Wdeprecated-declarations]
sstm
= this->create_publisher<nav_msgs::msg::MapMetaData>("map_metadata");
^
In file included from /opt/ros/dashing/include/rclcpp/node.hpp:1206:0,
from /opt/ros/dashing/include/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/dashing/include/rclcpp/executors.hpp:22,
from /opt/ros/dashing/include/rclcpp/rclcpp.hpp:144,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/include/slam_gmapping/slam_gmapping.h:30,
from /root/ros2_ws/src/slam_gmapping/slam_gmapping/src/slam_gmapping.cpp:24:
/opt/ros/dashing/include/rclcpp/node_impl.hpp:96:1: note: declared here
Node::create_publisher(
^~~~

Finished <<< slam_gmapping [8.76s]
`

@shiveshkhaitan
Copy link
Member

slam_gmapping is unable to find the definition of tf2_ros. Can you check if has it been built correctly?

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

2 participants