turtlebot_rrt
turtlebot_rrt copied to clipboard
Can this be run on ROS Melodic?
I have tested this package on ROS Kinetic and works perfectly fine after solving some errors through the steps followed in the issues tab here.
But, I am trying to test it on ROS Melodic as that's what I am mainly working with and when I catkin_make. The following error appears:
"
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc: In member function ‘std::pair<float, float> turtlebot_rrt::RRTPlanner::GetRandomPoint()’:
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:159:10: error: ‘random_device’ is not a member of ‘std’
std::random_device rd;
^~~~~~~~~~~~~
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:159:10: note: suggested alternative: ‘random_shuffle’
std::random_device rd;
^~~~~~~~~~~~~
random_shuffle
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:160:10: error: ‘mt19937’ is not a member of ‘std’
std::mt19937 gen(rd());
^~~~~~~
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:160:10: note: suggested alternatives:
In file included from /usr/include/boost/random.hpp:43:0,
from /home/shreyas/catkin_ws/src/turtlebot_rrt/include/turtlebot_rrt/turtlebot_rrt.h:62,
from /home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:37:
/usr/include/boost/random/mersenne_twister.hpp:624:61: note: ‘boost::random::mt19937’
11,0xffffffff,7,0x9d2c5680,15,0xefc60000,18,1812433253> mt19937;
^~~~~~~
/usr/include/boost/random/mersenne_twister.hpp:624:61: note: ‘boost::random::mt19937’
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:163:10: error: ‘uniform_real_distribution’ is not a member of ‘std’
std::uniform_real_distribution<> x(-map_width, map_width);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:163:10: note: suggested alternative: ‘uniform_int_distribution’
std::uniform_real_distribution<> x(-map_width, map_width);
^~~~~~~~~~~~~~~~~~~~~~~~~
uniform_int_distribution
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:163:36: error: expected primary-expression before ‘>’ token
std::uniform_real_distribution<> x(-map_width, map_width);
^
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:163:38: error: ‘x’ was not declared in this scope
std::uniform_real_distribution<> x(-map_width, map_width);
^
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:164:10: error: ‘uniform_real_distribution’ is not a member of ‘std’
std::uniform_real_distribution<> y(-map_height, map_height);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:164:10: note: suggested alternative: ‘uniform_int_distribution’
std::uniform_real_distribution<> y(-map_height, map_height);
^~~~~~~~~~~~~~~~~~~~~~~~~
uniform_int_distribution
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:164:36: error: expected primary-expression before ‘>’ token
std::uniform_real_distribution<> y(-map_height, map_height);
^
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:164:38: error: ‘y’ was not declared in this scope
std::uniform_real_distribution<> y(-map_height, map_height);
^
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:164:38: note: suggested alternative: ‘yn’
std::uniform_real_distribution<> y(-map_height, map_height);
^
yn
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc:166:28: error: ‘gen’ was not declared in this scope
random_point.first = x(gen);
^~~
/home/shreyas/catkin_ws/src/turtlebot_rrt/src/turtlebot_rrt.cc: In member function ‘std::vector<geometry_msgs::PoseStamped_<std::allocator
"
Is there any way to solve this? Is there a way to run packages built for ROS Kinetic on ROS Melodic?
Would love the opinion of the author of this package as well!
Thanks in Advance!
I add #include
Hey me as well! catkin_make worked when I added those 2 lines on turtlebot_rrt.cc. But I, get this error when I roslaunch:
shreyas@done-e495-1:~/catkin_ws$ roslaunch turtlebot_rrt rrt_planner.launch ... logging to /home/shreyas/.ros/log/37c3cb52-5378-11ec-9257-32bad228efc8/roslaunch-done-e495-1-19779.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.
Resource not found: turtlebot_gazebo ROS path [0]=/opt/ros/melodic/share/ros ROS path [1]=/home/shreyas/catkin_ws/src ROS path [2]=/opt/ros/melodic/share The traceback for the exception was written to the log file
Did you get it or know how to solve this?
Hey me as well! catkin_make worked when I added those 2 lines on turtlebot_rrt.cc. But I, get this error when I roslaunch:
shreyas@done-e495-1:~/catkin_ws$ roslaunch turtlebot_rrt rrt_planner.launch ... logging to /home/shreyas/.ros/log/37c3cb52-5378-11ec-9257-32bad228efc8/roslaunch-done-e495-1-19779.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.
Resource not found: turtlebot_gazebo ROS path [0]=/opt/ros/melodic/share/ros ROS path [1]=/home/shreyas/catkin_ws/src ROS path [2]=/opt/ros/melodic/share The traceback for the exception was written to the log file
Did you get it or know how to solve this?
I've also missed the problem. For me, I found the turtlebot3_gazebo package was missed. Then I run
sudo apt install ros-melodic-turtlebot3-*
this command helps me install all packages related to turtlebot3 including turtlebot3_gazebo. I've also modified rrt_plannner.launch. It seems that turtlebot has upgraded when ros was updated to melodic from kinetic. I can only see "turtlebot3_gazebo" but not "turtlebot_gazebo". In file rrt_plannner.launch, I changed "turtlebot _gazebo" to "turtlebot3_gazebo" like below:
<include file="$(find turtlebot3_gazebo)/launch/includes/$(arg base).launch.xml">
<arg name="base" value="$(arg base)"/>
<arg name="stacks" value="$(arg stacks)"/>
<arg name="3d_sensor" value="$(arg 3d_sensor)"/>
</include>
I thought I had solved this problem, but when I run follow command
roslaunch turtlebot_rrt rrt_plannner.launch
I got the below error message:
roslaunch turtlebot_rrt rrt_planner.launch
... logging to /home/robot/.ros/log/d86ce9d2-7f72-11ec-b176-000c29095d53/roslaunch-ubuntu-17993.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
RLException: while processing /opt/ros/melodic/share/turtlebot3_gazebo/launch/includes/kobuki.launch.xml:
Invalid roslaunch XML syntax: [Errno 2] No such file or directory: u'/opt/ros/melodic/share/turtlebot3_gazebo/launch/includes/kobuki.launch.xml'
The traceback for the exception was written to the log file
I changed directory to /opt/ros/melodic/share/turtlebot3_gazebo/launch, and I didn't find the directory "include". I think turtlebot3_gazebo must have updated its file layouts. For this project, we could not find the launch file this way.
I think this is a gap when you want to migrate turtlebot_rrt to melodic. It will be nice of you if you could fix this.