Skip to content

Commit

Permalink
bug fixes + intermediate tests + code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RKJenamani committed Oct 22, 2024
1 parent 5908409 commit 0d52bce
Show file tree
Hide file tree
Showing 47 changed files with 810 additions and 1,365 deletions.
7 changes: 7 additions & 0 deletions bite_acquisition/launch/franka.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<launch>
<arg name="plate_height" default="0.2"/>
<arg name="max_food_height" default="0.1"/>
<!-- Load the robot description parameter -->
<param name="robot_description" command="$(find xacro)/xacro '$(find franka_description)/panda_arm_hand.urdf'" />

<param name="robot_type" value="franka"/>
<param name="robot_config" value="/home/limbrepos/feeding_ws/src/franka_feeding/configs/feeding.yaml">
<param name="plate_height" value="$(arg plate_height)"/>
<param name="max_food_height" value="$(arg max_food_height)"/>

<!-- Start the joint state publisher GUI -->
<!-- <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" /> -->

Expand Down
93 changes: 44 additions & 49 deletions bite_acquisition/launch/kinova.launch
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
<launch>
<!-- Gen3 specific arguments required by Kortex API for instantiating a private communication session -->
<arg name="ip_address" default="192.168.1.10" doc="IP address for TCP/UDP comms"/>
<arg name="username" default="admin" doc="Username for kortex session"/>
<arg name="password" default="admin" doc="Password for kortex session"/>
<arg name="api_session_inactivity_timeout_ms" default="35000"/> <!--milliseconds-->
<arg name="api_connection_inactivity_timeout_ms" default="20000"/> <!--milliseconds-->
<arg name="dof" default="6"/> <!--degrees of freedom-->

<!-- Gen3 Hardware Node -->
<node name="controller" pkg="bite_acquisition" type="controller" output="screen">
<param name="ip_address" value="$(arg ip_address)"/>
<param name="username" value="$(arg username)"/>
<param name="password" value="$(arg password)"/>
<param name="api_session_inactivity_timeout_ms" value="$(arg api_session_inactivity_timeout_ms)"/>
<param name="api_connection_inactivity_timeout_ms" value="$(arg api_connection_inactivity_timeout_ms)"/>
</node>

<param name="robot_description" command="$(find xacro)/xacro --inorder $(find kortex_description)/robots/gen3_robotiq_2f_85.xacro dof:=$(arg dof) sim:=false vision:=true feeding_utensil:=true" />

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="false"/>
<rosparam param="source_list">["robot_joint_states", "wrist_joint_states"]</rosparam>
<param name="rate" value="100"/>
</node>

<!-- TF Setup -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="rob_st_pub">
<param name="ignore_timestamp" value="true" />
</node>

<node name="st_map2world" pkg="tf" type="static_transform_publisher" respawn="false" output="screen" args="0 0 0 0 0 0 1 map world 10"/>

<!-- <include file="$(find realsense2_camera)/launch/rs_rgbd.launch"/> -->

<!-- <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.026 0.063 0.031 0.5 0.5 0.5 -0.5 end_effector_link camera_link" /> BEST VALUES WITH 0.5 ROTATIONS -->

<!-- <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.013 0.07 0.024 0.5 0.5 0.5 -0.5 end_effector_link camera_link" /> -->

<!-- green blue red -->
<!-- <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.017 0.06 0.033 0.50080661 0.49902445 0.50068027 -0.49948635 end_effector_link camera_link" /> -->

<!-- <node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.01823 0.06065 0.0285 0.5 0.5 0.5 -0.5 end_effector_link camera_link" /> -->

<node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.01 0.0615 0.03 0.5 0.5 0.5 -0.5 end_effector_link camera_link" />
<!-- Gen3 specific arguments required by Kortex API for instantiating a private communication session -->
<arg name="ip_address" default="192.168.1.10" doc="IP address for TCP/UDP comms"/>
<arg name="username" default="admin" doc="Username for kortex session"/>
<arg name="password" default="admin" doc="Password for kortex session"/>
<arg name="api_session_inactivity_timeout_ms" default="35000"/> <!--milliseconds-->
<arg name="api_connection_inactivity_timeout_ms" default="20000"/> <!--milliseconds-->
<arg name="dof" default="7"/> <!--degrees of freedom-->
<arg name="plate_height" default="-0.005"/>
<arg name="max_food_height" default="0.1"/>

<param name="robot_type" value="$(eval 'kinova_6dof' if int(arg('dof')) == 6 else 'kinova_7dof')"/>
<param name="plate_height" value="$(arg plate_height)"/>
<param name="max_food_height" value="$(arg max_food_height)"/>

<!-- Gen3 Hardware Node -->
<node name="controller" pkg="bite_acquisition" type="controller" output="screen">
<param name="ip_address" value="$(arg ip_address)"/>
<param name="username" value="$(arg username)"/>
<param name="password" value="$(arg password)"/>
<param name="api_session_inactivity_timeout_ms" value="$(arg api_session_inactivity_timeout_ms)"/>
<param name="api_connection_inactivity_timeout_ms" value="$(arg api_connection_inactivity_timeout_ms)"/>
</node>

<param name="robot_description" command="$(find xacro)/xacro --inorder $(find kortex_description)/robots/gen3_robotiq_2f_85.xacro dof:=$(arg dof) sim:=false vision:=true feeding_utensil:=true" />

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="false"/>
<rosparam param="source_list">["robot_joint_states", "wrist_joint_states"]</rosparam>
<param name="rate" value="100"/>
</node>

<!-- TF Setup -->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="rob_st_pub">
<param name="ignore_timestamp" value="true" />
</node>

<node name="st_map2world" pkg="tf" type="static_transform_publisher" respawn="false" output="screen" args="0 0 0 0 0 0 1 map world 10"/>

<include file="$(find realsense2_camera)/launch/rs_rgbd.launch"/>

<node pkg="tf2_ros" type="static_transform_publisher" name="camera_link_broadcaster"
args="0.01 0.0615 0.03 0.5 0.5 0.5 -0.5 end_effector_link camera_link" />

<node type="rviz" name="rviz" pkg="rviz" args="-d $(find bite_acquisition)/scripts/configs/default.rviz" required="true" output="screen"/>

</launch>
Loading

0 comments on commit 0d52bce

Please sign in to comment.