[Discourse.ros.org] [Next Generation ROS] Issues with ament CmakeLists

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Issues with ament CmakeLists

Mikael Arguedas via ros-users


Hello All,

I just started out with ROS 2.0. I have the latest build. I am unsure if I am doing something stupid or missing out something. However, I can't build these simple files. If I should have posted somewhere else kindly let me know.
Command used for building:

    ament build --symlink-install --only-package testpackage


Error thrown:
![image|690x240](upload://t9jt2VJ0uiOIvO6bloVaRnVDnwJ.png)

This is my test_node.cpp

    #include <testpackage/testpackage.h>
      int main(int argc, char * argv[]){
             rclcpp::init(argc, argv);
             auto node = rclcpp::node::Node::make_shared("test");
             testRos2 test_object;
             test_object.initialize(node);
             rclcpp::spin(node);
             return 0;
     }


This is my test.cpp

    #include <testpackage/testpackage.h>
     testRos2::testRos2(){    }
     testRos2::~testRos2(){  }
     void testRos2::initialize(std::shared_ptr<rclcpp::node::Node>& n){
     }

This is my header:
 
    #pragma once
    #ifndef TESTPACKAGE
    #define TESTPACKAGE

    #include <iostream>
    #include <string>

    #include "rclcpp/rclcpp.hpp"
    #include "std_msgs/msg/string.hpp"

    using namespace std;

    class testRos2{

    public:
          testRos2();
          ~testRos2();
          void initialize(std::shared_ptr<rclcpp::node::Node>&);
     };
    #endif


CMakeLists:

    cmake_minimum_required(VERSION 3.5)

    project(testpackage)

    if(NOT WIN32)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
    endif()

    find_package(ament_cmake REQUIRED)
    find_package(rclcpp REQUIRED)
    find_package(std_msgs REQUIRED)

    include_directories(include
                                        ${rclcpp_INCLUDE_DIRS}
                    ${rmw_implementation_INCLUDE_DIRS}
                    ${std_msgs_INCLUDE_DIRS})

    add_library(test_lib
      src/test.cpp
     )
    target_link_libraries(test_lib ${rclcpp_LIBRARIES} ${rmw_implementation_LIBRARIES} ${std_msgs})

    add_executable(test_node src/test_node.cpp)
    ament_target_dependencies(test_node test_lib rclcpp std_msgs)

    install(
      DIRECTORY include/${PROJECT_NAME}/
      DESTINATION include
    )

    install(
      TARGETS test_lib test_node
      ARCHIVE DESTINATION lib
     LIBRARY DESTINATION lib
     RUNTIME DESTINATION bin
    )

    ament_package()





---
[Visit Topic](https://discourse.ros.org/t/issues-with-ament-cmakelists/2608/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Moveit and ROS-I Migration

Mikael Arguedas via ros-users


Those packages have not been ported (to my knowledge). You might be able to run them through the bridge, so long as the place you choose to put the bridge in the communication does not use Actions, as we don't have them in ROS 2.





---
[Visit Topic](https://discourse.ros.org/t/moveit-and-ros-i-migration/2608/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Moveit and ROS-I Migration

Mikael Arguedas via ros-users
In reply to this post by Mikael Arguedas via ros-users


Seeing MoveIt and descartes mentioned I'm guessing the application is going to involve motion control of an industrial robot.

All ROS-I drivers use action interfaces for interaction with clients. As there is no support for that in ROS2, you would either have to keep the code that interacts with the driver on the ROS1 side, or perhaps (but I'm not sure about this) do some manual publishing & tracking of the underlying messages.

Descartes itself is almost completely agnostic of the middleware. IIRC, it only uses `JointState` msgs in one of the examples so those can be submitted to the action servers in the drivers.





---
[Visit Topic](https://discourse.ros.org/t/moveit-and-ros-i-migration/2608/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Moveit and ROS-I Migration

Mikael Arguedas via ros-users
In reply to this post by Mikael Arguedas via ros-users


Yes I am planning to test that out. Will keep things updated in this thread.





---
[Visit Topic](https://discourse.ros.org/t/moveit-and-ros-i-migration/2608/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] Moveit and ROS-I Migration

Mikael Arguedas via ros-users
In reply to this post by Mikael Arguedas via ros-users


Hello,
Just some update here. Just like the other ros bridge demo, I could set up the bridge and subscribe to joint information passed on to from moveit running in ros1 and publish them in the ros2 terminal.

Looking forward to ros2 actions, maybe could do a bit more with moveit in ros2 after that.





---
[Visit Topic](https://discourse.ros.org/t/moveit-and-ros-i-migration/2608/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>