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

Manny's profile - activity

2018-09-05 21:54:28 -0500 edited answer how do I install rclpy on an arm processor with ros2?

Hey guys, so I've been trying to install ros2 for the last few hours and I think I understand the situation, but do not

2018-09-05 21:54:28 -0500 received badge  Editor (source)
2018-09-05 16:10:09 -0500 answered a question how do I install rclpy on an arm processor with ros2?

Hey guys, so I've been trying to install ros2 for the last few hours and I think I understand the situation, but do not

2016-06-16 08:43:59 -0500 received badge  Famous Question (source)
2016-03-18 04:00:43 -0500 received badge  Popular Question (source)
2016-03-18 04:00:43 -0500 received badge  Notable Question (source)
2016-02-10 02:12:57 -0500 received badge  Supporter (source)
2016-02-10 02:12:44 -0500 commented answer catkin_make not detecting .msg files in msg directory

I posted a very similar solution just now that I found, thank you for the prompt reply!

Oh yeah, why the heck don't they add this in ros.org/msg ? This would have really helped...

2016-02-10 02:09:59 -0500 answered a question catkin_make not detecting .msg files in msg directory

Okay so first I discovered I could run catkin_make like 4 times and then it will build all the proper header files in the include directory, but obviously that didn't solve the issue. So I searched for "catkin_make multiple times site:ros.org" and I found the solution.

cmake_minimum_required(VERSION 2.8.3)
project(mobility)

find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  roscpp
  sensor_msgs
  std_msgs
  random_numbers
  message_generation
)

add_message_files(
    FILES
    Resource.msg
    Pose2D.msg
    Status.msg
    )

generate_messages(
    DEPENDENCIES
    std_msgs
    )

catkin_package(
  CATKIN_DEPENDS geometry_msgs roscpp sensor_msgs std_msgs random_numbers
  message_runtime
)

add_executable(
  mobility src/mobility.cpp
)

add_dependencies(mobility ${catkin_EXPORTED_TARGETS})

target_link_libraries(
  mobility
  ${catkin_LIBRARIES}
)

I just needed to add

add_dependencies(mobility ${catkin_EXPORTED_TARGETS})

Where mobility is the executable(s)? for the package.

2016-02-10 00:56:49 -0500 asked a question catkin_make not detecting .msg files in msg directory

I'm fairly new to ROS, so I don't fully comprehend what's going on. This wasn't an issue until I installed some new python libraries to my computer earlier today. Essentially, when I run catkin_make it doesn't make the msg files available as header files in the include directory in the devel directory. So when it tries to compile the .cpp files in the source directory it says "mobility/Resource.h" no such file or directory.

Now, when I move the .msg files up one directory to the same directory as mobility/ where CMakeLists.txt and package.xml are, then it does detect them. This is the current directory structure with the .msg files where they are supposed to be.

This wasn't an issue at all until today. It compiled perfectly before today.

Oh yes. So if I do rosmsg list | grep mobility all 3 msg files show up.

Doesn't compile with this:

mobility/
├── CMakeLists.txt
├── msg
│   ├── Pose2D.msg
│   ├── Resource.msg
│   └── Status.msg
├── package.xml
└── src
    └── mobility.cpp

Compiles with this:

src/mobility/
├── CMakeLists.txt
├── msg
│   ├── Pose2D.msg
│   ├── Resource.msg
│   └── Status.msg
├── package.xml
├── Pose2D.msg
├── Resource.msg
├── src
│   └── mobility.cpp
└── Status.msg

Current CMake file:

cmake_minimum_required(VERSION 2.8.3)
project(mobility)

find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  roscpp
  sensor_msgs
  std_msgs
  random_numbers
  message_generation
)

add_message_files(
    FILES
    Resource.msg
    Pose2D.msg
    Status.msg
    )

generate_messages(
    DEPENDENCIES
    std_msgs
    )

catkin_package(
  CATKIN_DEPENDS 
  geometry_msgs 
  roscpp 
  sensor_msgs 
  std_msgs 
  random_numbers
  message_runtime
)


add_executable(
  mobility src/mobility.cpp
)

target_link_libraries(
  mobility
  ${catkin_LIBRARIES}
)

package.xml:

<?xml version="1.0"?>
<package>
  <name>mobility</name>
  <version>0.2.0</version>
  <description>Algorithmic implementation of random search as a finite state machine</description>

  <maintainer email="swarmathon@cs.unm.edu">NASA Swarmathon</maintainer>

  <license>GPLv2</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>random_numbers</build_depend>
  <build_depend>message_generation</build_depend>

  <run_depend>geometry_msgs</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>random_numbers</run_depend>
  <run_depend>message_runtime</run_depend>

</package>

first few lines of mobility.cpp:

#include <ros/ros.h>

//ROS libraries
#include <angles/angles.h>
#include <random_numbers/random_numbers.h>
#include <tf/transform_datatypes.h>

//ROS messages
#include <std_msgs/Int16.h>
#include <std_msgs/UInt8.h>
#include <std_msgs/String.h>
#include <sensor_msgs/Joy.h>
#include <sensor_msgs/Range.h>
#include <geometry_msgs/Pose2D.h>
#include <geometry_msgs/Twist.h>
#include <nav_msgs/Odometry.h>
#include "mobility/Resource.h"
#include "mobility/Pose2D.h"
#include "mobility/Status.h"
#include <map>
// To handle shutdown signals so the node quits properly in response to "rosnode kill"
#include <ros/ros.h>
#include <signal.h>