ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Alan8's profile - activity

2021-03-31 07:42:41 -0500 received badge  Student (source)
2020-01-22 22:10:33 -0500 received badge  Famous Question (source)
2020-01-22 22:10:33 -0500 received badge  Notable Question (source)
2019-07-22 08:17:48 -0500 received badge  Popular Question (source)
2019-07-19 16:40:59 -0500 commented question tf2 setup for Cartographer-ROS

OK, found my first error: Using the 2D backpack demo .launch and .lua files instead of creating my own, as described in

2019-07-19 15:25:47 -0500 received badge  Famous Question (source)
2019-07-19 14:51:32 -0500 asked a question tf2 setup for Cartographer-ROS

tf2 setup for Cartographer-ROS Hi, (This is a conceptual question; no specific code or software version.) I'm trying t

2019-07-19 09:05:46 -0500 received badge  Enthusiast
2019-07-17 13:58:16 -0500 commented answer Catkin_make error: Workspace contains non-catkin packages in it

Ok, an enhancement request. But from the user's point of view, it's indistinguishable from a bug; the user said "make"

2019-07-17 13:23:21 -0500 commented answer Catkin_make error: Workspace contains non-catkin packages in it

@gvdhoom: The bug is that there's no clue how to fix this problem; look at all the people who have been stuck on this ov

2019-07-17 12:22:33 -0500 commented answer Cannot build with catkin_make

Sorry. Replied here for the context.

2019-07-17 11:17:07 -0500 answered a question Catkin_make error: Workspace contains non-catkin packages in it

I have this same problem. No clue WHICH packages are "non-catkin". Looks like many other people have had this SAME PRO

2019-07-17 10:55:04 -0500 commented answer Cannot build with catkin_make

I have the same problem and tried your suggestion. The result: CMake Error: Error: generator : Unix Makefiles Does not

2019-07-17 10:54:50 -0500 commented answer Cannot build with catkin_make

I have the same problem and tried your suggestion. The result CMake Error: Error: generator : Unix Makefiles Does not

2019-07-10 14:40:35 -0500 received badge  Notable Question (source)
2019-07-03 15:45:01 -0500 commented question Can't find package: cartographer_ros

Found the packages: /opt/ros/melodic/share but cartographer_ros isn't there, even though I've "installed" it. Another m

2019-07-03 15:44:14 -0500 commented question Can't find package: cartographer_ros

Found the packages: /opt/ros/melodic/share but cartographer_ros isn't there, even though I've "installed" it. Another m

2019-07-03 15:10:04 -0500 marked best answer Can't find package: cartographer_ros

I'm trying to get a marker array containing pose info from cartographer_ros. I got the 2D cartographer_ros demo working, and the Subscribe demo working.

I'm now trying to modify the Subscribe demo to get pose messages from cartographer_ros, but the documentation for this is sparse so I'm experimenting.

The error I'm getting is not being able to "link" with cartographer_ros:

-- +++ processing catkin package: 'agitr'
-- ==> add_subdirectory(agitr)
-- Could NOT find cartographer_ros (missing: cartographer_ros_DIR)
-- Could not find the required component 'cartographer_ros'. The
following CMake error indicates that
you either need to install the package
with the same name or change your
environment so that it can be found.
CMake Error at
/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83
(find_package):

Package.xml:

<?xml  version ="1.0"?> <package>
        <name>agitr</name>
        <version>0.0.1</version>
        <description>
                Examples from A Gentle Introduction to ROS
        </description> <maintainer  email="alan@h3dgamma.com">
        Alan </maintainer> <license>TO DO</license>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>geometry_msgs</build_depend>
<run_depend>geometry_msgs</run_depend>

<build_depend>roscpp</build_depend>
<run_depend>roscpp</run_depend>

<run_depend>cartographer_ros</run_depend>

find_package(catkin REQUIRED
COMPONENTS roscpp cartographer_ros)

</package>

subpose.cpp:

#include <ros/ros.h>
#include <cartographer_ros/Pose.h>
#include <iomanip>

// for std :: setprecision and std :: fixed
// A callback function.  Executed each time a new pose
// message arrives.

void poseMessageReceived ( const  cartographer_ros::Pose& msg)  {
         ROS_INFO_STREAM( std::setprecision(2) << std::fixed
                         << " position =(" <<  msg.x << ", " << msg.y << " ) "
                         << "direction=" << msg.theta ) ;
 }

int main (int argc, char **argv)  {
        // Initialize the ROS system and become a node.
        ros::init (argc, argv, "subscribe_to_pose");
        ros::NodeHandle nh;
        ROS_INFO_STREAM("We're in main.\n");

      // Create a subscriber object.
      ros::Subscriber sub = nh.subscribe("cartographer_ros/pose", 1000,
                            &poseMessageReceived);
            // Let ROS take over.
            ros::spin();
}

ROS Environment:

ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_PACKAGE_PATH=/home/alan/sub/src:/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/alan/sub/devel/share/common-lisp
ROS_DISTRO=melodic

CMakeLists.txt:

# What version of CMake is needed?
cmake_minimum_required(VERSION 2.8.3)

# Name of this package.
project (agitr)

# Find the catkin build system, and any other packages on
# which we depend.
find_package(catkin REQUIRED COMPONENTS roscpp geometry_msgs cartographer_ros)

# Declare our catkin package.
catkin_package ()

# Specify locations of header files.
include_directories(include ${catkin_INCLUDE_DIRS})

# Declare the executable , along with i t s source f i l e s.  I f
# there are multiple executables, use multiple copies of
# this line.
add_executable (subpose subpose.cpp)

# Specify l i b r a r i e s against which to l i n k.  Again , t h i s
# l i n e should be copied f o r each d i s t i n c t executable in
# the package.
target_link_libraries(subpose ${catkin_LIBRARIES})

I'm using Ubuntu 18.04.2 LTS/melodic, gcc version 7.4.0.

(Sorry about the formatting; the XML angle brackets aren't coming through, and the font seems to be changing randomly.)

Thanks! Alan

2019-07-03 15:09:16 -0500 received badge  Popular Question (source)
2019-07-03 12:19:31 -0500 commented question Can't find package: cartographer_ros

In case anyone else is wondering how to do an install: sudo apt-get install ros-melodic-cartographer-ros The environme

2019-07-03 12:18:17 -0500 commented question Can't find package: cartographer_ros

In case anyone else is wondering how to do an install: sudo apt-get install ros-melodic-cartographer-ros The environme

2019-07-03 12:08:37 -0500 edited question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-03 12:08:06 -0500 commented question Can't find package: cartographer_ros

In case anyone else is wondering how to do an install: sudo apt-get install ros-melodic-cartographer-ros The environme

2019-07-03 11:43:10 -0500 commented question Can't find package: cartographer_ros

Found the packages: /opt/ros/melodic/share but cartographer_ros isn't there, even though I've "installed" it. Another m

2019-07-03 11:02:31 -0500 commented question Can't find package: cartographer_ros

Thanks for the comments Geoff. I assumed it was already installed since I can run the Cartographer 2D demo, but I reins

2019-07-02 13:07:22 -0500 edited question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-02 13:07:03 -0500 edited question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-02 13:06:00 -0500 edited question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-02 13:06:00 -0500 received badge  Editor (source)
2019-07-02 13:05:10 -0500 edited question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-02 13:03:46 -0500 asked a question Can't find package: cartographer_ros

Can't find package: cartographer_ros I'm trying to get a marker array containing pose info from cartographer_ros. I got

2019-07-01 16:07:01 -0500 received badge  Supporter (source)
2019-06-29 00:10:37 -0500 commented answer [skeleton.launch] is neither a launch file in package [skeleton_markers] nor is [skeleton_markers] a launch file

I get this error all the time! What a flaky system! Sourcing setup.bash fixes it SOMETIMES. It's not working now.