Comments (5)
Hi @aodongdong ,
By default, the Kinova Ethernet API assumes the default IP address for the robot as 192.168.100.11 https://github.com/Kinovarobotics/kinova-ros/blob/noetic-devel/kinova_driver/src/kinova_comm.cpp#L88. Seeing as you modified the addresses of your robots, this is probably why the Kinova API is unable to initialize. One easy way to get around this with your current setup would be to add an additional parameter to each one of your (left/right)_robot_parameters.yaml files such as :
ethernet: {
local_machine_IP: 192.168.1.30,
subnet_mask: 255.255.255.0,
local_cmd_port: 25000,
local_broadcast_port: 25025,
robot_IP: <your_robot_ip>
}
and then fetch it in the kinova_comm.cpp file :
//Set ethernet parameters
EthernetCommConfig ethernet_settings;
std::string local_IP,subnet_mask,robot_IP;
int local_cmd_port,local_bcast_port;
node_handle.getParam("ethernet/local_machine_IP", local_IP);
node_handle.getParam("ethernet/robot_IP", robot_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);
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(robot_IP.c_str());
ethernet_settings.robotPort = 55000;
You will need to rebuild the ROS workspace after doing these changes. Also, make sure that all of the ip addresses are under the same subnet mask. I have not tested this yet since I do not currently have access to an arm but it shouldn't break anything. Let me know if this works for you, don't hesitate if you get any other errors!
Best,
Santiago
from kinova-ros.
Hello, @smoya23
Thank you for your suggestion! Unfortunately, it doesn't work after i modified these parameters&codes according to your suggestion.
Specifically, I have tried two approaches.
- I set left arm ip to 192.168.100.44, and right arm to 192.168.100.45. My local machine ip is 192.168.100.30. I checked for the connection by ping, then i use the launch file to bringup, with .yaml files modified. It doesn't work with the same error as described above.
- According to your suggestion, i added robot_ip and modified kinova_comm.cpp file. Now, the .yaml is
ethernet: {
local_machine_IP: 192.168.100.30,
subnet_mask: 255.255.255.0,
local_cmd_port: 25015,
local_broadcast_port: 25025,
robot_IP: 192.168.100.44
}
for left arm, and
ethernet: {
local_machine_IP: 192.168.100.30,
subnet_mask: 255.255.255.0,
local_cmd_port: 25015,
local_broadcast_port: 25025,
robot_IP: 192.168.100.45
}
for right arm.
see the settings as follows:
Additionally, i changed launch file to
<launch>
<arg name="kinova_robotType" default="j2s6s300" />
<arg name="left_robotName" default="left_arm"/>
<arg name="right_robotName" default="right_arm"/>
<arg name="kinova_robotSerial" default="not_set" />
<arg name="use_jaco_v1_fingers" default="false" />
<arg name="feedback_publish_rate" default="0.01" />
<!-- If the node handles multiple robots uncomment this and configure /config/multiple_robots.yaml" -->
<rosparam file="$(find kinova_bringup)/launch/config/multiple_robots_test.yaml" command="load" />
<node name="$(arg right_robotName)_driver" pkg="kinova_driver" type="kinova_arm_driver" output="screen" cwd="node" args="$(arg kinova_robotType)" respawn="true">
<rosparam file="$(find kinova_bringup)/launch/config/right_kinova.yaml" command="load" />
<param name="serial_number" value="PJ00900006521429R" />
<param name="robot_name" value="$(arg right_robotName)" />
<param name="robot_type" value="$(arg kinova_robotType)" />
<param name="use_jaco_v1_fingers" value="$(arg use_jaco_v1_fingers)" />
<param name="status_interval_seconds" value="$(arg feedback_publish_rate)" />
<remap from="/right_arm_driver/out/joint_state" to="/joint_states" />
</node>
<node name="$(arg left_robotName)_driver" pkg="kinova_driver" type="kinova_arm_driver" output="screen" cwd="node" args="$(arg kinova_robotType)" respawn="true">
<rosparam file="$(find kinova_bringup)/launch/config/left_kinova.yaml" command="load" />
<param name="serial_number" value="PJ00900006521429L" />
<param name="robot_name" value="$(arg left_robotName)" />
<param name="robot_type" value="$(arg kinova_robotType)" />
<param name="use_jaco_v1_fingers" value="$(arg use_jaco_v1_fingers)" />
<param name="status_interval_seconds" value="$(arg feedback_publish_rate)" />
<remap from="/left_arm_driver/out/joint_state" to="/joint_states" />
</node>
</launch>
(which will launch right arm node first)
the error comes:
Note that we can bringup either of the two through ethernet. When one of them is brought up, we can find 2 devices was found by the upper computer. Subnet mask is set to 255.255.255.0 for both arms.
from kinova-ros.
Hi @aodongdong,
Sorry to hear it did not work! One thing I did not mention but should be done also, is to change the port numbers for each arm driver. So in either one of your left or right arm .yaml file, change the values for local_cmd_port
and local_broadcast_port
so that they differ from the other arm's config. Also, from your screenshots, I see that the left arm's driver is unable to launch, are you having the same issue with the right arm or is the right arm driver launching correctly ?
from kinova-ros.
Thanks for your kind suggestion @smoya23. The problem has been solved after setting different port numbers for each arm driver. Both arms can be launched at the same time through ethernet.
Specifically, I changed local_cmd_port
and local_broadcast_port
, and i have added robotport
param in .yaml so that it can be fetched in the kinova_comm.cpp.
(PS: The screenshots showcase two arms can not be launched concurrently.)
from kinova-ros.
@aodongdong Awesome, great to hear that you were able to solve the problem! Don't hesitate to open a new issue if you encounter any other problems.
from kinova-ros.
Related Issues (20)
- Fatal error in bringup HOT 1
- Tool position in gazebo HOT 2
- Where is TorqueDocumentationGeneral.html? HOT 1
- Jaco1: Problems with joint control and toque control mode HOT 6
- Torque control frequency HOT 4
- Robot collapsing upon start in Gazebo HOT 1
- start_force_control_service on j2s7s300 rotates J7/wrist to 180 radians and then locks J7 in that position during force control HOT 5
- com parameters on j2s7s300 HOT 2
- No motion plan found. No execution attempted HOT 2
- Simultaneous torque and speed control HOT 1
- Issues about the practical trajectory
- Support for expansion board? HOT 2
- Possibly wrong values between joint_1 and link_base HOT 1
- Tool_pose information and cartesian_client_control API in gazebo simulation
- I made a ROS2 pkg to support Mico and Jaco arm
- Error with gravity_compensated_mode.py j2n6s300
- where is Cyclic Synchronous Position Mode? HOT 1
- When I set the safety factor to 1.0, the arm can still easily switch to the position mode.
- jaco API not loaded example code does not execute
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinova-ros.