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

Aakin's profile - activity

2023-06-11 04:41:51 -0500 received badge  Famous Question (source)
2023-06-11 04:41:51 -0500 received badge  Notable Question (source)
2022-06-26 20:17:51 -0500 received badge  Popular Question (source)
2022-06-22 14:56:33 -0500 asked a question Controlling E-pick Vacuum Gripper which is connected to UR5 using ROS.

Controlling E-pick Vacuum Gripper which is connected to UR5 using ROS. Currently, I am using https://github.com/Universa

2022-06-22 14:54:48 -0500 asked a question Controlling E-pick Vacuum Gripper which is connected to UR5 using ROS.

Controlling E-pick Vacuum Gripper which is connected to UR5 using ROS. Currently, I am using https://github.com/Universa

2022-06-16 04:57:02 -0500 received badge  Famous Question (source)
2022-01-04 21:36:52 -0500 received badge  Notable Question (source)
2021-12-30 20:03:03 -0500 received badge  Popular Question (source)
2021-12-29 09:33:51 -0500 received badge  Enthusiast
2021-12-23 12:47:21 -0500 received badge  Notable Question (source)
2021-12-23 12:23:27 -0500 asked a question "Unable to transform frame from frame ' ' to frame "world'. Return identity in Moveit 'Pick and Place' Code.

"Unable to transform frame from frame ' ' to frame "world'. Return identity in Moveit 'Pick and Place' Code. [ WARN] [16

2021-10-04 13:40:20 -0500 asked a question Creating and writting to a .csv file in ROS

Creating and writting to a .csv file in ROS I created a node that subscribes to a odometry topic and want to take the da

2021-10-01 05:45:40 -0500 marked best answer Linker's Error while using ShapeShifter

I am getting linker's error while try to use ShapeShifter for getting size of ROS topic. Here is code:-

void topicCallback(const ShapeShifter::ConstPtr &msg, const std::string &topic_name)
{
  uint32_t length = msg->size();
  sizes+=length;

  auto time = std::chrono::system_clock::now();
  double diff = std::chrono::duration<double>(time-last).count();
  last=time;
  times+=diff;
}

ros::init(argc, argv, "universal_subscriber");
  ros::NodeHandle nh;

  boost::function<void(const ShapeShifter::ConstPtr &)> callback;
  callback = [topic_name](const ShapeShifter::ConstPtr &msg)
  {
    topicCallback(msg, topic_name);
  };

  ros::Subscriber subscriber = nh.subscribe(topic_name, 10, callback);

Error Message:

tp.cpp:(.text+0x2f): undefined reference to `topic_tools::ShapeShifter::size() const'
CMakeFiles/roshz.dir/src/tp.cpp.o: In function `ros::serialization::PreDeserialize<topic_tools::ShapeShifter>::notify(ros::serialization::PreDeserializeParams<topic_tools::ShapeShifter> const&)':
tp.cpp:(.text._ZN3ros13serialization14PreDeserializeIN11topic_tools12ShapeShifterEE6notifyERKNS0_20PreDeserializeParamsIS3_EE[_ZN3ros13serialization14PreDeserializeIN11topic_tools12ShapeShifterEE6notifyERKNS0_20PreDeserializeParamsIS3_EE]+0x243): undefined reference to `topic_tools::ShapeShifter::morph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/roshz.dir/src/tp.cpp.o: In function `boost::detail::sp_if_not_array<topic_tools::ShapeShifter>::type boost::make_shared<topic_tools::ShapeShifter>()':
tp.cpp:(.text._ZN5boost11make_sharedIN11topic_tools12ShapeShifterEJEEENS_6detail15sp_if_not_arrayIT_E4typeEDpOT0_[_ZN5boost11make_sharedIN11topic_tools12ShapeShifterEJEEENS_6detail15sp_if_not_arrayIT_E4typeEDpOT0_]+0x77): undefined reference to `topic_tools::ShapeShifter::ShapeShifter()'
CMakeFiles/roshz.dir/src/tp.cpp.o: In function `ros::SubscriptionCallbackHelperT<boost::shared_ptr<topic_tools::ShapeShifter const> const&, void>::getTypeInfo()':
tp.cpp:(.text._ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11topic_tools12ShapeShifterEEEvE11getTypeInfoEv[_ZN3ros27SubscriptionCallbackHelperTIRKN5boost10shared_ptrIKN11topic_tools12ShapeShifterEEEvE11getTypeInfoEv]+0xb): undefined reference to `typeinfo for topic_tools::ShapeShifter'
collect2: error: ld returned 1 exit status

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(roshz)

find_package(catkin REQUIRED COMPONENTS
  roscpp
)

catkin_package(
    INCLUDE_DIRS
    CATKIN_DEPENDS roscpp
  )

include_directories(include ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
add_definitions(${catkin_DEFINITIONS})

add_compile_options(-std=c++11)
add_executable(${PROJECT_NAME}
  src/roshz.cpp
  src/statistics.cpp
  src/tp.cpp
)

target_link_libraries(${PROJECT_NAME}
  ${catkin_LIBRARIES}
)

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
2021-10-01 05:45:40 -0500 received badge  Scholar (source)
2021-10-01 05:42:39 -0500 received badge  Popular Question (source)
2021-09-30 13:21:56 -0500 commented question Linker's Error while using ShapeShifter

Thanks a lot

2021-09-30 09:46:42 -0500 commented answer Creating generic topic subscribers with ShapeShifter

CMakeLists.txt:- cmake_minimum_required(VERSION 2.8.3) project(roshz) find_package(catkin REQUIRED COMPONENTS roscpp

2021-09-30 09:45:57 -0500 commented answer Creating generic topic subscribers with ShapeShifter

CMakeLists.txt:- cmake_minimum_required(VERSION 2.8.3) project(roshz) find_package(catkin REQUIRED COMPONENTS roscpp

2021-09-30 07:45:30 -0500 commented question Linker's Error while using ShapeShifter

@gvdhoorn I have updated my question and included my CMakeLists.txt and entire error message.

2021-09-30 07:43:54 -0500 edited question Linker's Error while using ShapeShifter

Linker's Error while using ShapeShifter I am getting linker's error while try to use ShapeShifter for getting size of R

2021-09-30 07:42:17 -0500 edited question Linker's Error while using ShapeShifter

Linker's Error while using ShapeShifter I am getting linker's error while try to use ShapeShifter for getting size of R

2021-09-30 07:41:46 -0500 edited question Linker's Error while using ShapeShifter

Linker's Error while using ShapeShifter I am getting linker's error while try to use ShapeShifter for getting size of R

2021-09-30 07:41:46 -0500 received badge  Editor (source)
2021-09-30 07:41:14 -0500 edited question Linker's Error while using ShapeShifter

Linker's Error while using ShapeShifter I am getting linker's error while try to use ShapeShifter for getting size of R

2021-09-29 20:50:47 -0500 commented question Linker's Error while using ShapeShifter

I am unable to understand the solution.

2021-09-29 20:45:36 -0500 commented question Linker's Error while using ShapeShifter

tp.cpp:(.text+0x2f): undefined reference to topic_tools::ShapeShifter::size() const' CMakeFiles/roshz.dir/src/tp.cpp.o:

2021-09-29 20:43:09 -0500 commented question Linker's Error while using ShapeShifter

tp.cpp:(.text+0x2f): undefined reference to topic_tools::ShapeShifter::size() const' CMakeFiles/roshz.dir/src/tp.cpp.o:

2021-09-29 20:42:22 -0500 commented question Linker's Error while using ShapeShifter

tp.cpp:(.text+0x2f): undefined reference to topic_tools::ShapeShifter::size() const' CMakeFiles/roshz.dir/src/tp.cpp.o:

2021-09-29 20:01:15 -0500 commented answer Creating generic topic subscribers with ShapeShifter

@gvdhoorn Can you please explain in detail that where to change because I am also getting same error. void topicCallbac

2021-09-29 20:01:15 -0500 asked a question Linker's Error while using ShapeShifter

Linker's Error while using ShapeShifter I am getting linker's error while try to use ShapeShifter for getting size of R