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

Get EINVAL with mocap_optitrack

asked 2016-07-28 07:35:53 -0500

xyz gravatar image

updated 2016-07-28 07:36:28 -0500

I am trying to use mocap_optitrack ( from https://github.com/ros-drivers/mocap_... ). I get EINVAL after the following code: struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = inet_addr( multicast_ip.c_str() ); mreq.imr_interface = m_local_addr.sin_addr; ROS_INFO( "Joining multicast group %s...", inet_ntoa( mreq.imr_multiaddr ) ); result = setsockopt(m_socket, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&mreq, sizeof(mreq));

the result is like this: what(): Failed to set socket option: EINVAL

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-28 08:35:40 -0500

xyz gravatar image

I just solved this. I gave the wrong IP address. I gave the local address of the motive computer, the right one is the multicast address.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-28 07:35:53 -0500

Seen: 268 times

Last updated: Jul 28 '16