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

Move-robot-ip-address-configuration-to-ros-launch-file-in-kinova-driver #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion kinova_driver/src/kinova_comm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@ KinovaComm::KinovaComm(const ros::NodeHandle& node_handle, boost::recursive_mute
// Set ethernet parameters
EthernetCommConfig ethernet_settings;
std::string local_IP, subnet_mask;
std::string inet_addr_string;
int local_cmd_port, local_bcast_port;
node_handle.getParam("ethernet/local_machine_IP", local_IP);
node_handle.getParam("ethernet/subnet_mask", subnet_mask);
node_handle.getParam("ethernet/local_cmd_port", local_cmd_port);
node_handle.getParam("ethernet/local_broadcast_port", local_bcast_port);
node_handle.getParam("kinovaControllerIpAddress", inet_addr_string);
ethernet_settings.localCmdport = local_cmd_port;
ethernet_settings.localBcastPort = local_bcast_port;
ethernet_settings.localIpAddress = inet_addr(local_IP.c_str());
ethernet_settings.subnetMask = inet_addr(subnet_mask.c_str());
ethernet_settings.rxTimeOutInMs = 1000;
ethernet_settings.robotIpAddress = inet_addr("192.168.100.11");
ethernet_settings.robotIpAddress = inet_addr(inet_addr_string.c_str());
ethernet_settings.robotPort = 55000;

// Get the serial number parameter for the arm we wish to connect to
Expand Down
2 changes: 2 additions & 0 deletions ovis_bringup/launch/ovis_arm.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
<arg name="kinova_robotType" default="c2s6s000" />
<arg name="kinova_robotName" default="ovis" />
<arg name="kinova_robotSerial" default="not_set" />
<arg name="kinovaControllerIpAddress" default="192.168.84.160" />
<arg name="use_jaco_v1_fingers" default="false" />
<arg name="feedback_publish_rate" default="0.1" />

<node name="$(arg kinova_robotName)" pkg="kinova_driver" type="kinova_arm_driver" output="screen" cwd="node" args="$(arg kinova_robotType)" respawn="true">
<rosparam file="$(find ovis_bringup)/launch/config/ovis_parameters.yaml" command="load" />
<param name="serial_number" value="$(arg kinova_robotSerial)" />
<param name="kinovaControllerIpAddress" value="$(arg kinovaControllerIpAddress)" />
<param name="robot_name" value="$(arg kinova_robotName)" />
<param name="robot_type" value="$(arg kinova_robotType)" />
<param name="use_jaco_v1_fingers" value="$(arg use_jaco_v1_fingers)" />
Expand Down