Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation torch-ros #6

Open
LiliMeng opened this issue Aug 19, 2016 · 9 comments
Open

compilation torch-ros #6

LiliMeng opened this issue Aug 19, 2016 · 9 comments

Comments

@LiliMeng
Copy link

Hi,

  Thanks a lot for providing the package!

  Could you provide some suggestion on how to compile it?

  Thanks a lot!
@LiliMeng
Copy link
Author

I downloaded it to the ~/catkin_ws/src file, and then
$cd torch-ros
$cmake .
It's good now. but after
$make
The following errors appear
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:255:104: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = RawMessage]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = RawMessage]’
/home/lci/catkin_ws/src/torch-ros/src/ros/publisher.cpp:34:20: required from here
/opt/ros/indigo/include/ros/message_traits.h:126:34: error: ‘const class RawMessage’ has no member named ‘__getMD5Sum’
return m.__getMD5Sum().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:264:106: required from ‘const char* ros::message_traits::datatype(const M&) [with M = RawMessage]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = RawMessage]’
/home/lci/catkin_ws/src/torch-ros/src/ros/publisher.cpp:34:20: required from here
/opt/ros/indigo/include/ros/message_traits.h:143:36: error: ‘const class RawMessage’ has no member named ‘__getDataType’
return m.__getDataType().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:127:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/opt/ros/indigo/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::DataType::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:144:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[2]: *** [CMakeFiles/rostorch.dir/src/ros/publisher.cpp.o] Error 1
make[1]: *** [CMakeFiles/rostorch.dir/all] Error 2
make: *** [all] Error 2

@andreaskoepf
Copy link
Member

@LiliMeng Nomally with ROS indigo installed you should be able to build the project with luarocks make in the directory where torch-ros resides. Seems as if the SerializeMessage specialization trick does not work on your system.

@robotsorcerer
Copy link

I seem to have a similar problem. I have indigo installed but it seems it's finding a hard time finding catkin.

I got the following errors:

CMake Error at CMakeLists.txt:7 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.

@robotsorcerer
Copy link

Moving it to my catkin_ws src folder and building from there seems to solve the problem. Might be worth addressing this in your readme. Thanks!

@vkee
Copy link

vkee commented Sep 14, 2016

@lakehanne, I tried that but I had no luck, I get that same error.

/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:255:104: required from ‘const char* ros::message_traits::md5sum(const M&) [with M = RawMessage]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = RawMessage]’
/home/vkee/momap/src/torch-ros/src/ros/publisher.cpp:34:20: required from here
/opt/ros/indigo/include/ros/message_traits.h:126:34: error: ‘const class RawMessage’ has no member named ‘__getMD5Sum’
return m.__getMD5Sum().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of ‘static const char* ros::message_traits::DataType::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:264:106: required from ‘const char* ros::message_traits::datatype(const M&) [with M = RawMessage]’
/opt/ros/indigo/include/ros/publisher.h:112:7: required from ‘void ros::Publisher::publish(const M&) const [with M = RawMessage]’
/home/vkee/momap/src/torch-ros/src/ros/publisher.cpp:34:20: required from here
/opt/ros/indigo/include/ros/message_traits.h:143:36: error: ‘const class RawMessage’ has no member named ‘__getDataType’
return m.__getDataType().c_str();
^
/opt/ros/indigo/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::MD5Sum::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:127:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/opt/ros/indigo/include/ros/message_traits.h: In static member function ‘static const char* ros::message_traits::DataType::value(const M&) [with M = RawMessage]’:
/opt/ros/indigo/include/ros/message_traits.h:144:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^

@robotsorcerer
Copy link

robotsorcerer commented Sep 14, 2016

Is the /home/vkee/momap directory where you have your catkin workspace? Another note, do not use cmake in the src folder. You want to use catkin_make from within the root folder of your catkin workspace.

@vkee
Copy link

vkee commented Sep 14, 2016

That is my catkin workspace.

I did that, but it said it finished building without building torch-ros at all.

@robotsorcerer
Copy link

Maybe delete your build folder and then re-catkin_make. Sometimes, the
cmakelists cache text files in the build directory doesn't get updated
unless you explicitly delete them. Don't forget to cd to torch-ros
directory afterwards and install the rockspec with luarocks.

You should be fine.

Sincerely,
Lekan

On 14 September 2016 at 12:23, Vincent Kee [email protected] wrote:

That is my catkin workspace.

I did that, but it said it finished building without building torch-ros at
all.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#6 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIChJHRTluEYNh1B_9iCN6jx_qNrisPHks5qqC15gaJpZM4JouZo
.

@nehagarg
Copy link

nehagarg commented Aug 20, 2021

Hi, I am able to compile this on ros indigo but facing the compilation issue i.e message traits not defined for RawMessage, while compiling on ros melodic. Any idea how to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants