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

David_milne's profile - activity

2021-09-15 13:21:03 -0500 received badge  Famous Question (source)
2021-09-15 13:21:03 -0500 received badge  Notable Question (source)
2021-05-26 15:47:31 -0500 marked best answer Trouble building rosserial_windows library from source

Hi,

I am I'm pretty new to ROS and trying to build the rosserial_windows library to create a ros publisher node in my c++ project.
I am attempting to follow this tutorial, but I can't use the instructions:

sudo apt-get install ros-hydro-rosserial-windows
sudo apt-get install ros-hydro-rosserial-server

because I'm using ros-for-windows
I tried the instruction from ms-iot consuming a ROS package

choco install ros-melodic-rosserial-windows

but that package doesn't exist. Trying the next step:

rosinstall_generator rosserial_windows --deps --exclude RPP --tar --flat > pkg.rosinstall
rosinstall_generator rosserial_server --deps --exclude RPP --tar --flat > pkg.rosinstall

wstool init src
wstool merge -r -y -t src pkg.rosinstall
wstool update -t src

rosdep update
rosdep install --from-paths src --ignore-src -r -y

catkin_make

The catkin_make threw an error

C:\opt\~\src\rosserial_server\include\rosserial_server/topic_handlers.h(40): fatal error C1083: Cannot open include file: 'rosserial_msgs/RequestMessageInfo.h': No such file or directory

In the "ros\melodic\x64\include\rosserial_msgs" there is no "RequestMessageInfo.h"
Okay different tact, new workspace, I cloned the rosserial repository.

git clone -b melodic-devel  https://github.com/ros-drivers/rosserial.git
catkin_make
catkin_make install

works fine.
side note: I compared the cloned "rosserial_server/topic_handlers.h" with the rosinstall_generator "rosserial_server/topic_handlers.h" and the cloned one didn't include RequestMessageInfo.h
back to the original tutorial:

devel\setup.bat
rosrun rosserial_windows make_libraries.py my_library
[rosrun] Couldn't find executable named make_libraries.py

This seems to be an issue with "rosserial_windows"'s CMakeList.txt not pointing to the correct "make_libraries.py" path but as far as I can tell, which isn't very far, it is pointing to it

cmake_minimum_required(VERSION 2.8.3)
project(rosserial_windows)

find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  nav_msgs
  rosserial_client
  sensor_msgs
  std_msgs
)

catkin_package(CATKIN_DEPENDS)

install(
  DIRECTORY src/ros_lib
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/src
)

catkin_install_python(
  PROGRAMS src/${PROJECT_NAME}/make_libraries.py
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

- the path to the "rosserial_windows" package is:

<catkin workspace>\src\rosserial\rosserial_windows

-the path to "make_libraries.py" is:

<catkin workspace>\src\rosserial\rosserial_windows\src\rosserial_windows\make_libraries.py

I'm very confused, I've just spent the last 7 hours trying to build a library ;~;
What's the blatantly obvious thing I've missed?

2021-02-05 04:15:21 -0500 received badge  Famous Question (source)
2021-02-05 04:15:21 -0500 received badge  Notable Question (source)
2020-09-30 23:57:57 -0500 received badge  Popular Question (source)
2020-06-30 19:25:37 -0500 received badge  Popular Question (source)
2020-06-29 22:58:18 -0500 asked a question rosserial_windows not connecting to socket_node

rosserial_windows not connecting to socket_node Hi, I'm running ros melodic on windows 10, and I'm trying to send a mes

2020-06-10 05:07:56 -0500 answered a question Trouble building rosserial_windows library from source

I found a workaround by using the path from the package root folder to the "make_libraries.py" rosrun rosserial_windows

2020-06-10 05:07:56 -0500 received badge  Rapid Responder (source)
2020-06-09 02:08:02 -0500 asked a question Trouble building rosserial_windows library from source

Trouble building rosserial_windows library from source Hi, I am I'm pretty new to ROS and trying to build the rosserial

2020-06-07 01:56:12 -0500 received badge  Enthusiast