Hi wrld,
So after cloning the repo into the src folder, I ran catkin_make from my workspace.
I am running into this error:
In file included from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:4:0:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:149:8: error: ‘default_random_engine’ in namespace ‘std’ does not name a type
std::default_random_engine gen_;
^~~~~~~~~~~~~~~~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:150:8: error: ‘random_device’ in namespace ‘std’ does not name a type
std::random_device rd_;
^~~~~~~~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::probSample()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:582:20: error: ‘rd_’ was not declared in this scope
double prob0 = rd_() % 10 * 0.1;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:582:20: note: suggested alternative: ‘id_t’
double prob0 = rd_() % 10 * 0.1;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::addGoalOrientNode()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:650:26: error: ‘rd_’ was not declared in this scope
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:650:26: note: suggested alternative: ‘id_t’
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:660:26: error: ‘rd_’ was not declared in this scope
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:660:26: note: suggested alternative: ‘id_t’
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::addRandomNode()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:675:19: error: ‘rd_’ was not declared in this scope
float x = rd_() % map_sizex_;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:675:19: note: suggested alternative: ‘id_t’
float x = rd_() % map_sizex_;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:687:19: error: ‘rd_’ was not declared in this scope
float x = rd_() % map_sizex_;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:687:19: note: suggested alternative: ‘id_t’
float x = rd_() % map_sizex_;
^~~
id_t
In file included from /opt/ros/melodic/include/ros/ros.h:40:0,
from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:7,
from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:4:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::map_initial(costmap_2d::Costmap2DROS*)’:
/opt/ros/melodic/include/ros/console.h:348:176: warning: format ‘%f’ expects argument of type ‘double’, but argument 10 has type ‘int’ [-Wformat=]
::ros::console::print(filter, _rosconsole_define_location__loc.logger, _rosconsole_define_location__loc.level, FILE, LINE, ROSCONSOLE_FUNCTION, VA_ARGS)
^
/opt/ros/melodic/include/ros/console.h:351:5: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER’
ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(NULL, VA_ARGS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:387:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION’
ROSCONSOLE_PRINT_AT_LOCATION(VA_ARGS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:572:35: note: in expansion of macro ‘ROS_LOG_COND’
#define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, VA_ARGS)
^~~~~~~~~~~~
/opt/ros/melodic/include/rosconsole/macros_generated.h:162:23: note: in expansion of macro ‘ROS_LOG’
#define ROS_WARN(...) ROS_LOG(::ros::console::levels::Warn, ROSCONSOLE_DEFAULT_NAME, VA_ARGS)
^~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:750:4: note: in expansion of macro ‘ROS_WARN’
ROS_WARN("freespace num:%d,mapsize%d,freespace in a map%f,",j,mapSize,j/mapSize);
^
ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/build.make:62: recipe for target 'ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/src/rrt_planner2.cpp.o' failed
make[2]: *** [ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/src/rrt_planner2.cpp.o] Error 1
CMakeFiles/Makefile2:5587: recipe for target 'ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/all' failed
make[1]: *** [ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
Starts out with an error: ‘default_random_engine’ in namespace ‘std’ does not name a type
std::default_random_engine gen_;
followed by the rest.
Do you know how I can resolve them?
I'm running ROS Melodic on Ubuntu 18.
Hi wrld,
So after cloning the repo into the src folder, I ran catkin_make from my workspace.
I am running into this error:
In file included from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:4:0:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:149:8: error: ‘default_random_engine’ in namespace ‘std’ does not name a type
std::default_random_engine gen_;
^~~~~~~~~~~~~~~~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:150:8: error: ‘random_device’ in namespace ‘std’ does not name a type
std::random_device rd_;
^~~~~~~~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::probSample()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:582:20: error: ‘rd_’ was not declared in this scope
double prob0 = rd_() % 10 * 0.1;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:582:20: note: suggested alternative: ‘id_t’
double prob0 = rd_() % 10 * 0.1;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::addGoalOrientNode()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:650:26: error: ‘rd_’ was not declared in this scope
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:650:26: note: suggested alternative: ‘id_t’
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:660:26: error: ‘rd_’ was not declared in this scope
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:660:26: note: suggested alternative: ‘id_t’
p.x = goal_x_ + (rd_() % 200 - 100) * 0.08;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::addRandomNode()’:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:675:19: error: ‘rd_’ was not declared in this scope
float x = rd_() % map_sizex_;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:675:19: note: suggested alternative: ‘id_t’
float x = rd_() % map_sizex_;
^~~
id_t
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:687:19: error: ‘rd_’ was not declared in this scope
float x = rd_() % map_sizex_;
^~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:687:19: note: suggested alternative: ‘id_t’
float x = rd_() % map_sizex_;
^~~
id_t
In file included from /opt/ros/melodic/include/ros/ros.h:40:0,
from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt2.h:7,
from /home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:4:
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp: In member function ‘void rrt_plan::RRTPlanner::map_initial(costmap_2d::Costmap2DROS*)’:
/opt/ros/melodic/include/ros/console.h:348:176: warning: format ‘%f’ expects argument of type ‘double’, but argument 10 has type ‘int’ [-Wformat=]
::ros::console::print(filter, _rosconsole_define_location__loc.logger, _rosconsole_define_location__loc.level, FILE, LINE, ROSCONSOLE_FUNCTION, VA_ARGS)
^
/opt/ros/melodic/include/ros/console.h:351:5: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER’
ROSCONSOLE_PRINT_AT_LOCATION_WITH_FILTER(NULL, VA_ARGS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:387:7: note: in expansion of macro ‘ROSCONSOLE_PRINT_AT_LOCATION’
ROSCONSOLE_PRINT_AT_LOCATION(VA_ARGS);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/ros/console.h:572:35: note: in expansion of macro ‘ROS_LOG_COND’
#define ROS_LOG(level, name, ...) ROS_LOG_COND(true, level, name, VA_ARGS)
^~~~~~~~~~~~
/opt/ros/melodic/include/rosconsole/macros_generated.h:162:23: note: in expansion of macro ‘ROS_LOG’
#define ROS_WARN(...) ROS_LOG(::ros::console::levels::Warn, ROSCONSOLE_DEFAULT_NAME, VA_ARGS)
^~~~~~~
/home/akul/catkin_ws/src/ROS_RRT/src/rrt_planner_3/src/rrt_planner2.cpp:750:4: note: in expansion of macro ‘ROS_WARN’
ROS_WARN("freespace num:%d,mapsize%d,freespace in a map%f,",j,mapSize,j/mapSize);
^
ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/build.make:62: recipe for target 'ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/src/rrt_planner2.cpp.o' failed
make[2]: *** [ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/src/rrt_planner2.cpp.o] Error 1
CMakeFiles/Makefile2:5587: recipe for target 'ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/all' failed
make[1]: *** [ROS_RRT/src/rrt_planner_3/CMakeFiles/rrt_lib2.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
Starts out with an error: ‘default_random_engine’ in namespace ‘std’ does not name a type
std::default_random_engine gen_;
followed by the rest.
Do you know how I can resolve them?
I'm running ROS Melodic on Ubuntu 18.