Get EINVAL with mocap_optitrack
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